Edit Text Files with Admin Permissions

Here is how you can edit a file as an Administrator

Windows is designed in a way to be a multi-user operating system, allowing a whole host of users to use the operating system at the same time and have their own sets of permissions and file spaces. However, there is certain advanced functionality that is limited to privileged-users only. This privilege user is known as an Administrator in Windows.

An Administrator has access to view and change system files and perform certain changes that affect the way the system works in a significant way. As a result, to perform any important changes, you need to have adminlevel access.

To check if your user has administrator-level access or not, you can use our guide over here. Once you have verified that your user has administrator privileges, you can edit almost any file or make any change to your PC.


There are certain system files on a PC that can’t be edited. For example, if you open drive and go to the Windows folder and open any text file, it will be protected by default to not allow users without admin access to edit any file. Even if you paste or delete any additional file in this location, it will require administrator permission. Any newly added files will be protected from editing by default.

To edit these files, it will require you to open a text-editor as an administrator and then edit the file. There are several ways you can do it.

Edit File as Administrator Using Third-Party Software

  1. If you have a text editor like Notepad++ or Sublime Text, you can directly open that application as an administrator using our guides over here and here.
  2. Once you have done that, simply open the file you weren’t allowed to edit, edit it, and then press Save. This time it should work.

Edit File as Administrator Using Notepad

If you don’t want to download any third-party application and want to edit the file using Notepad, here’s how you can do that,

  1. Open the Command Prompt as administrator. You can open the Run dialog box by pressing Start + R, type cmd, and then press Ctrl + Shift + Enter to open as administrator. (Refer to our guide) It should open with an Administrator written at the top.
  2. Navigate to the directory where the file is placed (refer to our guide for commands) and type the name of the file and press Enter. (Note: For this, Notepad should be set as the default editor)
  3. Now when you edit and save the file, it should save because now you have administrator rights.

Copy Edited File in Location

One alternative to opening an application as an administrator to edit a protected file is to simply copy the edited file in the location.

  1. Copy the file you want to edit in any other location.
  2. Open it and edit it.
  3. Paste it back in the original location. This time, it’ll ask you to provide administrator permission. Just press Continue.