How can I run a Control Panel applet or snap-in configuration as another user from the command line?

A. Normal best practice for administrators is to log on under a user account and, as needed, use Runas or Winternals' Psexec utility (which you can download at http://www.sysinternals.com/Utilities/PsExec.html) to run programs with Administrator privileges. However, you can't use this method to run some items (e.g., .cpl and .msc files). To work around this limitation, you can use the Psexec utility and call the file by adding a "cmd /c start" prefix to the command. For example, the following code will fail to run the System Control Panel applet:

C:\WINDOWS>psexec -d -i -e -u Administrator sysdm.cpl
 

However, if you add "cmd /c start" to the command, as the following example shows, the command will run the applet.

C:\WINDOWS>psexec -d -i -e -u Administrator cmd /c start sysdm.cpl

You could include such commands in batch files and place the files on your desktop/menus for fast access to the applications within the correct user context.

Discuss this Article 2

dumitrurobert
on Sep 24, 2011
How about: "control.exe sysdm.cpl"? ;) C:\WINDOWS>psexec -d -i -e -u Administrator control.exe sysdm.cpl

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.