Runas
right, ive gone past caring if this is on the right board or not, so my question.i would like to create a batch script to run programs under an admin account using runas, i would like to be prompted for the password. this is the ONLY problem i have, the one and only problem, no other problem, just this one.Runas does not work from a batch script. this particular line of the script is the line that does not work.runas /env /user:domain\admin program.exeplease check my syntax and if possible test before you post a solution. the only thing that happens when the above line is entered into a batch file is it goes into a continuous echo loop.ps, the above command works in a command interface, but not a batch file.thanks in advance.
January 23rd, 2009 10:27am
Hi,I tried this from the batch file and worked perfectly for me, when I execute the bat file from DOS prompt or double click on it, it asks for the password of admin and when I enter, it executes the program.Just make sure that you have RunAs.exe file in the system drive/path defined in environment variable (C:\Windows or in C:\Windows\System32 directory).This is Exchange Server - Admin forum, suggest you to use Windows forum to get proper direction in case you still don't have luck :)Windows Forum:http://social.technet.microsoft.com/Forums/en-US/category/windowsserver/Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
January 23rd, 2009 4:00pm