Link to home
Start Free TrialLog in
Avatar of Cav IT
Cav ITFlag for South Africa

asked on

Runas

I created a new admin account for a specific program that requires admin rights. When I run the following runas command

runas /profile /user:domain\DefaultAdminAcc "C:\Program Files (x86)\DMMultiView\MultiView.exe"

It works perfect, however when I run the same command with the new admin account created I get the following error.

RUNAS ERROR: Unable to run - C:\Program Files (x86)\DMMultiView\MultiView.exe
740: The requested operation requires elevation.

The new admin account is part of the same groups as the original admin account.

Any suggestions?
Avatar of Raheman M. Abdul
Raheman M. Abdul
Flag of United Kingdom of Great Britain and Northern Ireland image

Did you update the group policy:

gpupdate /force
Avatar of Cav IT

ASKER

I did try that, didn't make a difference.
how do you run the command?

are you saving it as a bat file or just type?

as far as I can see you need to run it as elevated mode, which is run as administrator on the command prompt first then run the command.
Avatar of Cav IT

ASKER

For now I am just running it in a elevated command prompt window. The first time you must run it as an elevated command in order to save the credentials.

As soon as it works I will create a short cut with the command and place it on the users Desktop.
That's expected behavior.
The builtin admin "administrator" is not governed by UAC. He always acts elevated. Simply elevate your script by rightclicking it and selecting "run as administrator".
Avatar of Cav IT

ASKER

I don't get it. I open command prompt in elevated mode, when I run the following command I still get the error.

runas /profile /user:cavalierfoods\progadmin /savecred "C:\Program Files (x86)\DMMultiView\MultiView.exe"

C:\Windows\system32>runas /profile /user:cavalierfoods\progadmin /savecred "C:\P
rogram Files (x86)\DMMultiView\MultiView.exe"
Attempting to start C:\Program Files (x86)\DMMultiView\MultiView.exe as user "ca
valierfoods\progadmin" ...
RUNAS ERROR: Unable to run - C:\Program Files (x86)\DMMultiView\MultiView.exe
740: The requested operation requires elevation.
I think runas opens another session, that does not carry over the elevation.
Let me try it later on, so I can solve it for you.
Avatar of Cav IT

ASKER

Thanks McKnife.
To follow your plan, you would need a command line elevator. http://technet.microsoft.com/en-us/magazine/2008.06.elevation.aspx is such a thing. place elevate.exe and elevate.vbs in your windows folder (they are inside the compressed file). Now put the word elevate before the command in your script.

runas /profile /user:cavalierfoods\progadmin /savecred elevate "C:\Program Files (x86)\DMMultiView\MultiView.exe"
Avatar of Cav IT

ASKER

I did place the 2 files in Windows folder and ran the following command in command prompt.

runas /profile /user:cavalierfoods\progadmin /savecred /elevate "C:\Program Files (x86)\DMMultiView\MultiView.exe"

I still cant get it to run with the progadmin account, I have to run it with the build in administrator account.
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial