Add an "Open With Notepad As Administrator" Shortcut to the Context Menu in Windows 7 and Windows Vista

In Windows Vista and Windows 7, when you double-click a text file which is located in a protected system folder (like the "Program Files" folder) or one of its subfolders, you'll notice that you can view its contents, but you will not be able to save any changes you made. This is because default users usually have no write access to any protected system folders. This is actually a good thing, because it prevents viruses and other malicious software to mess with your system's files. But in some cases, you need to edit these files on purpose. There are numerous ways to deal with this issue, but the easiest and most convenient way is to add a special menu item in the Windows context menu which will allow you to open any file in Notepad as administrator, thus being able to change any file you like. To add "Open With Notepad As Administrator" Shortcut to the Context Menu, follow below steps.

Steps

Install

  1. Open Notepad by going to Start → All Programs → Accessories → Notepad.
  2. Copy codes given below and paste them in Notepad.

  1. In Notepad, go to File → Save As... and save the file with name NotepadAsAdmin.inf. Be sure to change the Save as Type: from Text Documents to All Files.
  2. Go to the location where you just saved the "NotepadAsAdmin.inf" file. Right click on the file and click on "Install" from context menu.
  3. To try it, right-click on any file in Windows Explorer and you will see a new menu item called "Notepad as Admin". Click on that option and that file will be opened in Notepad.

</ol>

Uninstall

  1. Go to Start → Control Panel → Add or Remove Programs.
  2. Click on the Remove for Notepad as Admin PowerToy (Uninstall only) entry.

Tips

  • You can create a similar shortcut to open any folder in the command prompt as Administrator: Click here to see how