: If the command worked, the script continues normally.
The next morning, his boss asked, "Hey, did the migration finish?" force batch file to run as admin
Alan sipped his cold coffee. "The batch file… promoted itself." : If the command worked, the script continues normally
Always include this line at the top of your admin scripts to "reset" the path to the script's location: cd /d "%~dp0" : If the command worked
When you use the self-elevating script method above, Windows will still show the UAC prompt (the screen dims and asks, "Do you want to allow this app to make changes to your device?").