I’ve used Notepad++ for a while now, but only recently started exploring all the various plugins that are available. One very helpful plugin is called “Save as Admin”, which can overcome a common issue when trying to edit files for which the local Users group does not have modify permissions. This often happens with web.config files, which by default live in a folder that only Administrators can modify. Even if you are a member of the Administrators group, you will still receive a “Save Failed” error message asking “Please check if this file is open in another program.” when you try and save any changes:
To fix this you have a few options:
- Close Notepad++ and re-open it as an administrator.
- Use the edit button on the security tab of the file properties to give the Users group or your individual user modify permissions.
- Save the file to another location like your desktop, and then copy from there into the destination folder. This will cause Explorer to display a “You must be an administrator to perform this action” window, but it will allow you to use your Administrator role to complete the action.
- Use the “Save as Admin” plugin in Notepad++ to elevate to the Administrator role and save the file.
If you have already made changes to the file and do not have the plugin installed, option 2 or 3 is the only way to keep those changes (the others require closing and reopening Notepad++). Once you install the “Save as Admin” plugin you can then use that to overcome any permissions issues.
To install the plugin open the Plugin Manager:
Type the letter S to find “Save as Admin” and check the box. You can install multiple plugins at once, and I recommend also adding “Compare”, “Reload"Button”, and “XML Tools”.
Once you have selected the plugins you want press the Install button. It will download and install the plugins, most of which show up under the Plugins folder. When finished it will prompt you to restart Notepad++
NOTE: if you had pending changes to a file you may see the following:
Here you should press no (loosing any changes) or yes and save to another location. Notepad++ should then restart. Now when you try to save a file that requires Administrator privileges you will get a UAC prompt:
Pressing Yes will allow Notepad++ to save the file using your administrator role.