You can use PowerShell to run b.bat as administrator from a.bat
:
set mydir=%~dp0
Powershell -Command "& { Start-Process \"%mydir%b.bat\" -verb RunAs}"
It will prompt the user with a confirmation dialog. The user chooses YES
, and then b.bat
will be run as administrator.