I want the batch file to run and launch some programs, all of which need to be at administrator level.
Asked
Active
Viewed 2,063 times
3 Answers
2
Make a shortcut to runas.exe with the arguments /user:"AdminUser" "C:\MyBatchFile.cmd" where AdminUser is the username of the user you want to run the file as, and MyBatchFile.cmd is the name of the file.
MiffTheFox
- 3,520
2
To get the "Do you want to allow this program to make changes to your computer prompt" and not have to enter the password you need to do the following.
On your shortcut, right click, choose properties, click the "Advanced..." button on the bottom right of the Shortcut tab.
Choose "Run as an Administrator". Click Ok,OK.
Jeff Martin
- 408
0
You could run the script as a startup script and assign through a GPO if possible. This runs as an administrator and using the GPO should make it simple to manage.
Dave M
- 13,250