Solved

RunAs command won't open Control Panel in limited account but works in admin account - why?

Posted on 2007-11-22
18
796 Views
Last Modified: 2010-04-21
I am trying to familiarize myself with the runas command so I can do my IT work more efficiently.  I am experimenting at home on my windows xp pro machine that is part of a workgroup.  Right now, my issue is that when I try to run control panel or control admintools using the runas command, the cmd window pops up, asks me for my password, says it is attempting to open my choice, but never does.  The hourglass shows for a moment, then disappears.  I do have the secondary logon service running, it starts automatically, and I verified I can do this in the administrator account to see if my syntax was that far off.  I also opened the command prompt using the runas command.  I tried the same from within that window, and still control panel or administrative tools will not open.  Has anyone encountered this and found the problem?  If you could help me identify the problem I would greatly appreciate it.
0
Comment
Question by:Bigdoggit
  • 10
  • 7
18 Comments
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
it's a special "folder" that's not really a folder, and not meant for "Run As". You can right click on things in the Start Menu but not Control Panels and Administrative Tools.  The GUI already knows that. Seems like the Command Line version doesn't quite get it
0
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
as a matter of fact, even Explorer doesn't work. You can right-click on Explorer in Accessories, and Run As comes up, but I can't get that to work
0
 

Author Comment

by:Bigdoggit
Comment Utility
Damn - then runas is definitely misleading for me.  So I suppose I have to learn every single security executable.  Well, you have the points, out of curiosity, is there a way adjust security settings for files while logged in as a limited user and to open Local Security policy, Services, etc.?
0
 

Author Comment

by:Bigdoggit
Comment Utility
also, when running as a limited account, but opening cmd.exe as an administrator, I can't just type in control admintools like I can as administrator.  Is there a way to make this work for me while logged in as a limited user?
0
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
when cmd.exe interacts with Windows, control goes back to Windows, so your normal account applies unfortunately

Usually, you find the shortcut and RunAs on it.
0
 

Author Comment

by:Bigdoggit
Comment Utility
I don't follow you with the shortcut thing - your saying create a shortcut with runas attached to it and then it works?
0
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
find the EXE or a shortcut to the EXE.
You can right-click on it to use "Run As.."
0
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
p/s - the Control Panel applets you are referring to are in
C:\WINDOWS\system32, with the names  *.msc

I forgot to also mention that whereas RunAs doesn't go from Admin->Limited, you can in fact go Limited->Admin. I know it works because I just tried it!

runas /user:administrator "Control Panel"

(I logged in as a limited user)
0
 

Author Comment

by:Bigdoggit
Comment Utility
okay, now that's my problem.  For some reason my system says it is attempting to start control panel, but doesn't actually start it.  what the hell?  I had read that I could do this and when I try it I can't.  Is there some setting that would prevent this from running properly?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:Bigdoggit
Comment Utility
oh, wait - you mean right click and choose runas - but doing this from the command line doesn't, right?
0
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
first off, are you currently logged in as administrator or limited user?

I rarely (never) use RunAs from the command line. I just find the shortcut/exe file and right-click, RunAs.
0
 

Author Comment

by:Bigdoggit
Comment Utility
logged in as a limited account.
0
 

Author Comment

by:Bigdoggit
Comment Utility
okay, well, if I open a command prompt window into administrator from a limited account, I can type in secpol.msc - I guess that's easy too, of course it isn't that hard to navigate tot he executable.  But I can't open control panel by typing it in a command prompt window running as an administrator or just typing the runas command.
0
 

Author Comment

by:Bigdoggit
Comment Utility
where is control panel located at? in what folder?
0
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
Comment Utility
okay. to run control panel applets, locate the file *.msc in \windows\system32, right-click RunAs. that should work.
Special places : explorer.exe, Control Panels, Administrative Tools cannot be started from the command line from a limited user.  Runas cmd.exe will work, but that still doesn't get Control Panels going
0
 

Author Comment

by:Bigdoggit
Comment Utility
you are right.  I was playing some more too, and what I found is I have to start a command prompt from the limited user account with administrative privileges.  Then I can start any of the .msc, .exe, or .cpl tools from then and they retain their administrative privileges.  I suppose what it comes down to is that I can't use the graphical interface of control panel to run these tools while logged in as a limited account, I will just have to memorize their file names and/or locations.  I can do that.  Would have been easier the other way, but hell, this is Windows.  Sometimes I forget (still, the point is we have a solution)  Thanks for your help - it is great to bounce ideas off someone and you helped push me in the right direction.  Rock on imitchie!
0
 

Author Closing Comment

by:Bigdoggit
Comment Utility
He did exactly what needed to be done - I also noted the other half that I will use on the job, but wouldn't have gotten there alone.
0
 
LVL 6

Expert Comment

by:Wallsy
Comment Utility
Actually, the problem is that control panel is just explorer. You can run a .cpl file directly from an elevated command prompt, or an .msc, but not control.exe. It just fires up explorer.exe - and as it's already running you can't start another instance.

There is a way around it - when logged on as an administrator, open an explorer window and from the Tools menu, Folder Options choose the View tab and in the Advanced box tick the "Launch folder options in a separate process" option. Then you can start more than one instance of explorer.exe and they can be running as different users.

HTH,

Wallsy
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

13 Experts available now in Live!

Get 1:1 Help Now