?
Solved

Runas

Posted on 2014-04-07
11
Medium Priority
?
2,373 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
The goal of this Micro Tutorial is to help navigate beginning users with the app store on Windows 8. It will explain exciting features how to maximize your PC through these apps. This will be demonstrated using Windows 8 operating system.
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

800 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