Skip navigation

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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish