Cav IT
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\DefaultAdminA cc "C:\Program Files (x86)\DMMultiView\MultiVie w.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\MultiVie w.exe
740: The requested operation requires elevation.
The new admin account is part of the same groups as the original admin account.
Any suggestions?
runas /profile /user:domain\DefaultAdminA
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\MultiVie
740: The requested operation requires elevation.
The new admin account is part of the same groups as the original admin account.
Any suggestions?
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.
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.
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.
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".
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".
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\progad min /savecred "C:\Program Files (x86)\DMMultiView\MultiVie w.exe"
C:\Windows\system32>runas /profile /user:cavalierfoods\progad min /savecred "C:\P
rogram Files (x86)\DMMultiView\MultiVie w.exe"
Attempting to start C:\Program Files (x86)\DMMultiView\MultiVie w.exe as user "ca
valierfoods\progadmin" ...
RUNAS ERROR: Unable to run - C:\Program Files (x86)\DMMultiView\MultiVie w.exe
740: The requested operation requires elevation.
runas /profile /user:cavalierfoods\progad
C:\Windows\system32>runas /profile /user:cavalierfoods\progad
rogram Files (x86)\DMMultiView\MultiVie
Attempting to start C:\Program Files (x86)\DMMultiView\MultiVie
valierfoods\progadmin" ...
RUNAS ERROR: Unable to run - C:\Program Files (x86)\DMMultiView\MultiVie
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.
Let me try it later on, so I can solve it for you.
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\progad min /savecred elevate "C:\Program Files (x86)\DMMultiView\MultiVie w.exe"
runas /profile /user:cavalierfoods\progad
ASKER
I did place the 2 files in Windows folder and ran the following command in command prompt.
runas /profile /user:cavalierfoods\progad min /savecred /elevate "C:\Program Files (x86)\DMMultiView\MultiVie w.exe"
I still cant get it to run with the progadmin account, I have to run it with the build in administrator account.
runas /profile /user:cavalierfoods\progad
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
gpupdate /force