From the Windows Taskbar, you can start a program elevated by holding the Ctrl & Shift keys and then clicking on a pinned shortcut. 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.
This article tells you how to add a right-click menu option to run a program elevated.
Example: Add “Notepad (Administrator)” Option to the Context Menu
- Click Start, type
regedit.exeand go to:HKEY_CLASSES_ROOT\*\shell
- Create a subkey named
Notepad - Select Notepad, double-click the
(default)value and set “Notepad (Administrator)” as the data - Create a string value named
HasLUAShield(This adds the UAC shield icon to the context menu item. Ref: Add UAC Shield Icon to the Right-Click Menu)
- Create a string value named Extended

- Under the
Notepadkey, create another subkey namedCommand -
Select
Command, and type in the following value data for(default)"C:\Windows\System32\nircmd.exe" elevate notepad.exe "%1"(Assuming that you’ve copied NirCmd.exe to the Windows\System32 directory.)

- 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
Register and Unregister DLLs from the Right-click menu. (REG file)

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

Take Ownership of a file or folder from the context menu. (REG file)

One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!