I have .config files set to open in Notepad++. The files I edit are typically in protected locations (e.g. c:\windows\, c:\program files..., etc..) thus requiring administrator access.

I'd like to be able to double click on a .config file and have Notepad++ open with Administrator privileges. It's fine if the UAC prompt comes up.

Is there a way to do that?

link|improve this question

feedback

5 Answers

up vote 10 down vote accepted

The best way to is to go straight to the folder in which Notepad++ is installed (Program Files), there, find the Notepad++ executable, right-click on it, and select Compatibility, and at the bottom check the box for Run as administrator.

This WILL make your application always pop up with a UAC warning, but you'll always have the ability to edit as administrator.

Good luck!

link|improve this answer
feedback

As an improvement over @Askeli's answer, you can first make a copy of the notepad++ executable (Name it something like NotepadUAC). Then set the compatibility mode in the properties of your copy to require administrator mode as suggested by Askeli. Now you should also be able to set your .config files to open up using the copy rather than the original.

The advantage here is that you won't see the UAC prompt when opening files with the original (default) Notepad++ .exe file. The disadvantage is that this copy isn't necessarily going to keep itself up to date in the same way as the original, and might eventually cause problems with mismatched .dll or config versions. But it's always easy enough to uninstall/reinstall if that happens.

link|improve this answer
@akseli's suggestion works, however, I still see the UAC prompt. Anyway, I can live with it. – AngryHacker Dec 6 '10 at 23:38
feedback

My solution was to pin Notepad++ to the taskbar. When I need it for system files editing I right click on it, click on "Notepad++", and click on "Run as administrator".

The other solutions modifying the shortcut or making copies of it are fine if you are editing system files all the time. I use Notepad++ on a daily basis but I don't mess with protected files every day.

link|improve this answer
feedback

Uninstall the plugins (except plugin manager). This fixed the problem for me. You can install one plugin at time to see which plugin(s) causes problems.

link|improve this answer
feedback

You can download Programmer's Notepad.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.