In the Windows 7 Taskbar, you can start a program elevated by holding the CTRL & SHIFT keys and then clicking on a Pinned shortcut. Unfortunately there are no keyboard shortcuts available to start a program elevated via the context menu. To launch a program elevated from the right-click menu, you can add custom entries and launch it using a script or using the NirCmd utility. Earlier we wrote about the new "elevate" command-line argument in NirCmd, which you can implement in the context menu.
Add "Notepad (Administrator)" Option to the Context Menu
1. Click Start, type Regedit.exe and go to:
2. Create a subkey named Notepad
3. Select Notepad, double-click the (default) value and "Notepad (Administrator)" as the value data
4. Create a string value named HasLUAShield
(This adds the UAC shield icon to the context menu item in Windows 7. REF: Add UAC Shield Icon to the Right-Click Menu)
5. Create a string value named Extended

6. Under Notepad key, create another subkey named Command
7. Select Command, and type in the following value data for (default)
(Assuming that you’ve copied NirCmd.exe to the Windows\System32 directory.)

8. Exit the Registry Editor.
Press and hold the SHIFT key down, right-click on a file (say, the HOSTS file) that you want to edit using Notepad under elevated privileges, and then click Notepad (Administrator)

Other Possible Uses
#1 Register and Unregister DLLs from the Right-click menu. (REG file)

#2 Open an elevated Command Prompt window from the Desktop context menu. (REG file)

#3 Take Ownership of a file or folder from the context menu. (REG file)
Related Posts
- How to Add UAC Shield Icon to Static (Right-Click) Context Menu in Windows 7
- Automation Error in Program Compatibility Wizard
- Fix for Windows Installer Errors 2738 and 2739 in Windows Vista
- Open an Elevated Command Prompt From the Desktop Context Menu
- Games Explorer Link in the Vista Start Menu Does Not Work
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?




[...] How to Run a Program Elevated via the Right-Click Menu in Windows 7/Vista? [The Winhelponline Blog] | More document.write(''); Posted on 08/18/10 [...]
My hero! That’s just what I needed.
Now, Notepad isn’t as good a candidate as Notepad++ is; especially when a Hex Editor plug-in is installed on the Notepad++. Think of the possibilities!