Friday, January 30, 2009

Run Control Panel applets as administrator

Sometimes you'll want to do file and folder modifications, or even partition formatting, but you won't want to do it while logged on as an administrator.
Every Control Panel applet is in fact a file with a .CPL extension. If you perform a search for these files you'll see that they're all located in the %systemroot%\system32 folder.
1) Right-click any file and choose Run As.
2) A dialog box will pop-up asking you for a valid username and password. Enter one of a user that has the required administrative privileges to run and manage that applet.
3) If you gave a valid username and password the applet will open giving you the full permissions to manage it.
4) That's it!

it's time you got to know the RUNAS command that's now native in W2K and XP. Open a Command Prompt and run the following command:

runas /user:computername\Administrator command

where computername is the name of your computer, and username is the name of the user you're trying to run the command as (e.g. Administrator). The command is the command you're trying to run (e.g. a batch file, an .exe file or even a control panel applet).
For example, to open System from a command line as an administrator, type:

runas /user:computername\Administrator "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl"

For a list of some of the Control Panel applet filenames see this (incomplete) list:
Control Panel Applet Filename
Accessibility access.cpl
Add New Hardware hdwwiz.cpl
Add/Remove Programs appwiz.cpl
Date/Time Properties timedate.cpl
Display Properties desk.cpl
FindFast findfast.cpl
Internet Properties inetcpl.cpl
Joystick Properties joy.cpl
Keyboard Properties main.cpl
Local Users management nusrmgr.cpl
Microsoft Exchange mlcfg32.cpl
MicrosoftMailPostOffice wgpocpl.cpl
Modem Properties modem.cpl
Note: In Windows NT 4.0, W2K, XP and Windows 2003 -
Modem properties is telephon.cpl
Mouse Properties main.cpl
Multimedia Properties mmsys.cpl
Network Properties netcpl.cpl
Note: In Windows NT 4.0, W2K, XP and Windows 2003 - Network
properties is Ncpa.cpl
Password Properties password.cpl
Power Options powercfg.cpl
Regional Settings intl.cpl
Sound Properties mmsys.cpl
System Properties sysdm.cpl

No comments: