Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Runas

Posted on 2014-04-07
11
Medium Priority
?
2,718 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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 56

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 56

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 56

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 56

Accepted Solution

by:
McKnife earned 2000 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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

636 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