Solved running a program from command line as administrator

September 13, 2012 at 14:57:50
Specs: Windows 7

How can I run a program from the command line as an administrator. I'm looking for a command line equivalent to right-clicking on the program icon and choosing "Run as Administrator".

See More: running a program from command line as administrator

Report •

September 13, 2012 at 15:36:35
depending on command you maybe able to give the account and password credencials.
If its a scheduled task you can run it under an admin account [never the administrator account]

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's

Report •

September 13, 2012 at 18:19:42
✔ Best Answer
try "runas /user:administrator program.exe"
running this will prompt you for the admin password.

Another way you could do it is run command prompt as administrator and run the program there.

Report •

September 17, 2012 at 07:31:12
Thanks Jordan,

I suspect those two approaches aren't quite the same thing. Right-clicking and running cmd (or anything) as administrator doesn't prompt me for credentials like 'runas' does, so I suspect they're different.

In any case, it doesn't seem to want to accept anyone's username/password (not just administrator).

Report •
Related Solutions

Ask Question