Subscribe to Windows IT Pro
September 07, 2005 12:00 AM

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

Windows IT Pro
InstantDoc ID #47672
Rating: (1)

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.

Related Content:

ARTICLE TOOLS

Comments
  • dumitrurobert
    8 months ago
    Sep 24, 2011

    How about: "control.exe sysdm.cpl"?

    ;)

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

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.