Solved

Runas

Posted on 2014-04-07
11
2,090 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 55

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
 
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 55

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 55

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 55

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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

691 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