multiple commands from one runas line
Not sure if this is the right forum for this but here goes. I need to launch a program from a runas prompt. This is easy enough, but I also need the command to map a drive so that the program runs correctly. As I do not want to have to enter the password for the runas user twice, I want all of this on one line. A trawl through google hasn't helped so I've turned to the great wisdom of technet. Any ideas? Sytax would be something like: runas /user:pc\otheruser net use k: \\ipaddress\share "C:\Program Files\manufacturor\program.exe"
April 7th, 2012 10:11am

try... runas /user:pc\user "cmd.exe /k net use K: \\ipaddress\share&&\"C:\Program Files\manufacturor\program.exe\"" you can change the /k for /c if you want the command prompt to close after executing the command.Regards qSilverx
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2012 11:21am

Brilliant! Thanks a lot. I hadn't thought of putting it all nested as a cmd argument.
April 8th, 2012 3:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics