If you’ve ever tried to edit a system file using Notepad on a Windows PC, you’ve probably seen an error that says “Notepad access denied.” This usually happens when you try to modify the system file from the standard user account on the PC. Windows does this so that your system files are protected and that only an administrator can make changes to them.
If you still need to access and edit the file using Notepad, you will need to open Notepad as administrator. It should then give you the rights you need to modify any system files on your computer. There are several ways to run Notepad as administrator, and here we will show you some of them.
Open Notepad as an administrator with the right-click menu
The easiest way to run Notepad as an administrator is to use the option from the context menu. Chances are, you’ve already used this option if you’ve ever tried to run the application as administrator.
- Find the Notepad application on your computer. If you use it a lot, it might be on your desktop.
- Right-click the application and select the Run as administrator option.
- You will be prompted for an administrator password. Enter your password and click “Yes”.
Notepad will run as an administrator, allowing you to modify any files on your system.
Run Notepad as administrator by creating a shortcut
The above method may be inconvenient for you if you need to run Notepad too often as an administrator.
Fortunately, there is a method that eliminates right-clicking on a file and automatically launches Notepad as an administrator. However, you will need to enter your administrator password each time.
- Right- click any empty space on the desktop and select “New” and then “Shortcut”. This will allow you to add a new shortcut to your desktop.
- You will be prompted for the location of the element for which you want to create a shortcut. Enter the following in the box and click Next. This is the path to the Notepad application.
% windir% system32 notepad.exe
- Now enter a name for your shortcut. It should be something that clearly tells you what the label is for. We would suggest using something like Notepad with an admin. When you’ve named your shortcut, click Finish.
- The newly created shortcut should be available on your desktop. Right-click it and select the Properties option to give it administrator rights.
- Go to the Shortcut tab, find and click the Advanced button.
- On the next screen, select the Run as administrator check box and click OK.
From now on, whenever you double click on the newly created shortcut, it opens the Notepad application with administrator privileges.
Run Notepad with admin rights from Cortana Search
Searching for Cortana also lets you open an instance of Notepad with administrator privileges. Basically you need to find the application and then select the option that launches it.
- Place your cursor in the Cortana search box and type Notepad.
- When Notepad appears. in the search results, right-click it and select “Run as administrator”.
- Enter the admin password and the application will open.
Using a third-party application to access Notepad with administrator rights
Since most users prefer to use Notepad to edit system files, there is now even an application that allows you to launch this text editor as administrator every time you open it.
This application is called RunAsTool and allows you to run any application on your computer as an administrator. It is free to download and use.
- Download and run RunAsTool on your computer. It is portable so you don’t need to install it.
- You will be prompted to select an administrator account. Select it and then enter the password for the account. Then click “Apply” to continue.
- Click the File menu at the top and select Add File.
- Go to the Windows folder, go to System32 and double-click Notepad.exe.
- Select Notepad in the app and make sure Run as administrator is enabled in the right pane.
- Right-click the Notepad in the application and select Create Shortcut.
- Choose where you want to place the shortcut.
Double clicking on this newly created shortcut will launch Notepad as administrator on your PC. It doesn’t ask for an admin password, but it does ask for UAC permissions.
Opening files directly with administrator rights in Notepad
If you notice, all of the above methods require you to first open Notepad and then edit the files. What if you could directly open the files you want to edit in Notepad as an administrator? Well there is.
Using the Windows Registry Editor, you can add an item to the context menu that allows you to open any files in Notepad with administrator rights.
- Log in to an administrator account on your PC. Press the Windows + R keys at the same time, type regedit and press Enter. The Registry Editor will open.
- Open the following path in the editor.
HKEY_CLASSES_ROOT * shell
- Right-click the shell directory and select New, then Key to create a new key.
- Enter runas for the key name.
- Click the runas key you just created, and then double-click Default on the right side of the pane.
- Type “Open” in Administrator Notepad and press Enter.
- Create a new key under runas by right-clicking runas and selecting New and then Key. Name this key command.
- Double-click Default for the control key and enter the following. Replace PCNAME with your computer name. The name of your PC can be found in Control Panel> System.
runas / savecred / user: PCNAME Administrator “notepad% 1”
- Now right-click any file you want to edit and select “Open in Notepad with Administrator.”
- You will be prompted for an administrator password.
This is just a one-time password prompt and you will not need to enter your password the next time you use this option.