If you’ve ever tried to edit a system file with Notepad on your Windows PC, you’ve probably seen the error “Notepad access denied”. The error usually occurs when you try to modify the file system from a standard user account on the PC. Windows does this to make sure system files are protected and only admins can change them.
If you still need to access and edit files with Notepad, you’ll need to open Notepad with admin rights. You will then be given the necessary privileges to modify any system files on the machine. There are many ways to run Notepad with admin rights as follows.
Open Notepad with admin rights using the right-click menu
The easiest way to run Notepad as admin is to use an option from the context menu. You may have used this option before if you have ever tried to run an application with admin rights.
- Locate the Notepad application on the machine. It can stay on the desktop if you use it often.
- Right click on the application and select Run as administrator.
- You will be prompted for the admin password. Enter the password and press Yes.
- Notepad will launch with admin rights, allowing you to modify any file on the system.
Run Notepad as admin by creating a shortcut
The above method may not be convenient for you if you need to run Notepad as admin too often.
Fortunately, there is a method that eliminates the need to right-click on the file and automatically launch the Notepad application with admin rights. Even so, it will ask you to enter the admin password every time.
- Right click anywhere on the desktop and select New > Shortcuts. It will allow you to add a new shortcut to the desktop.
- You will be asked to enter the location of the item for which you want to create the shortcut. Type the following in the box and press Next. Here is the link to the Notepad application.
%windir%system32notepad.exe
- Now you need to enter a name for the shortcut such as Notepad with Adminthen tap Finish.
- The newly created shortcuts will be available on the desktop. Right click on it and select option Properties to grant administrative rights.
- Go to tab Shortcutfind and click the button Advanced.
- On the following screen, check the box Run as administrator and click OK.
From now on, whenever you double-click on the shortcut you just created, the Notepad application will open with admin rights.
Launch Notepad with admin rights from Cortana Search
Cortana search also allows you to open an instance of Notepad with admin rights. Basically, you need to search for the app and then select the option to launch 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.
Use a third-party app to access Notepad with admin rights
Since most users prefer to use Notepad to edit system files, now there is an application that allows you to run this text editor with admin rights every time you open it.
The app is called RunAsTool and it allows you to run any application on your computer with admin rights. RunAsTool is available for free to download and use.
- Download RunAsTool and launch the application on your PC. This is a portable application, so you do not need to install it.
- You will be asked to choose an admin account. Select it and then enter the password for the account. Then press Apply to continue.
- Click the menu File at the top and select Add Files.
- Navigate to folder Windowsgo to section System32 and double click Notepad.exe.
- Choose Notepad in the app and make sure the option Run as administrator enabled in the right panel.
- Right click on Notepad in the application and select Create Shortcuts.
- Select a location where you want to place the shortcut.
- Double clicking on this newly created shortcut will launch Notepad with admin rights on the PC. It does not require admin password but will need UAC permission.
Directly open files with admin rights in Notepad
All of the above methods require you to open Notepad first to edit your files. There is a way you can directly open the files you want to edit in Notepad with admin rights.
Using the Windows Registry Editor, you can add an option to the right-click menu that allows you to open any file in Notepad with admin rights.
- Log in to the admin account on the PC. Press the keys
Win
+R
at the same time, enter regedit and pressEnter
. Registry Editor will open. - Go to the following path in Registry Editor.
HKEY_CLASSES_ROOT*shell
- Right click on the folder shell and choose New > Key to generate a new key.
- Import runas as the name of the key.
- Click on the key runas just created and then double click Default in the right window.
- Import Open in Notepad with Admin and press
Enter
. - Create a new key in runas by right clicking on runas and choose New > Key. Name this key command.
- Double click Default in key command and enter the following. Replace PCNAME with your computer’s name. The PC name can be found in Control Panel > System.
runas /savecred /user:PCNAMEAdministrator “notepad %1”
- Now right click on any file you want to edit and select Open in Notepad with Admin.
- You will be asked to enter the admin password.
You will be asked to enter your password the next time you use the option.
Source link: How to open Notepad with admin rights
– https://techtipsnreview.com/