Thank you. That works.
Main Topics
Browse All TopicsI can not get the correct syntaxes of runas.exe command to start BAT files as an administrator from user profile. I want the command in one row. Of course I can start CMD.EXE as an administrator and then start BAT file, but it is long.
I want to start BAT file like a msi o msc file
runas.exe /user:Domain\username "mmc.exe gpedit.msc"
Something like that
P.S. If I write runas.exe /user:Domain\username "cmd.exe 1.bat" only command promt opens. But BAT file doesn't start to work.
Thank you!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
please try this:
runas.exe /user:Domain\username 1.bat
runas.exe /user:Domain\username "cmd.exe 1.bat" will tell the runas to run cmd.exe, but not the 1.bat. and given that 1.bat is an executable batch file.
you may refer http://technet.microsoft.c
Business Accounts
Answer for Membership
by: oBdAPosted on 2009-09-21 at 00:51:55ID: 25380878
add a /c or /k after cmd.exe; /c will close the command window once the batch file has been processed, /k will keep it open:
runas.exe /user:Domain\username "cmd.exe /c 1.bat"