Description: | Force a batch to run as different user via RunAs command. This snippet checks the USERNAME environment variable. If it`s not `Administrator` then it automatically restart the batch with Administrator credentials using the RunAs command. Administrator password is required. | ||
Script: | Download: DosRunAsAdmin.bat
|
||
Script Output: |
|