Solved

Runas

Posted on 2014-04-07
11
1,740 Views
Last Modified: 2014-08-20
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?
0
Comment
Question by:Yeaktom
11 Comments
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39983189
Did you update the group policy:

gpupdate /force
0
 
LVL 2

Author Comment

by:Yeaktom
ID: 39983240
I did try that, didn't make a difference.
0
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 39983301
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.
0
 
LVL 2

Author Comment

by:Yeaktom
ID: 39983322
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.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39983536
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".
0
Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

 
LVL 2

Author Comment

by:Yeaktom
ID: 39986253
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.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39986563
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.
0
 
LVL 2

Author Comment

by:Yeaktom
ID: 39986646
Thanks McKnife.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 39986894
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"
0
 
LVL 2

Author Comment

by:Yeaktom
ID: 39987993
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.
0
 
LVL 53

Accepted Solution

by:
McKnife earned 500 total points
ID: 39990153
It seems you ddi not copy+paste. There should be no / next to elevate!
Ok, can only tell you what I did: I did not use savecred, but entered credentials.
runas /user:myadmin elevate test.bat
test.bat goes
cmd /c md c:\windows\test
(a command which requires elevation and would fail without elevate.exe).
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now