Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want the batch file to run and launch some programs, all of which need to be at administrator level.

share|improve this question
add comment

3 Answers

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.

share|improve this answer
    
This will work, but it will make you put the password in for the user you are running as. –  Jeff Martin Apr 19 '10 at 20:36
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.