1

I have been using Notepad2 lately, great util and i added it to the context menu hence i can click on a file and say Notepad2 and it edits it .. but it loads notepad2 without admin privs so i can't save the file.. How can i force it to open with admin privs

Here is what i have, works great apart from can't save in protected parts of disks in vista but of course loading notepad manually as admin works.

[HKEY_CLASSES_ROOT*\shell]

[HKEY_CLASSES_ROOT*\shell\Notepad2]

[HKEY_CLASSES_ROOT*\shell\Notepad2\command] @="\"C:\Program Files\Notepad2\Notepad2.exe\" \"%1\""

user14422
  • 113

4 Answers4

2

Use a shortcut to hstart (see this question) with the /ELEVATED parameter to start Notepad2.

[HKEY_CLASSES_ROOT\*\shell\Notepad2\command]
@="\"c:\\path\\to\\hstart.exe\" /elevated \"\"c:\\Program Files\\Notepad2\\Notepad2.exe\" \"%1\"\""
Snark
  • 33,097
1

You can use the Elevate Power Toy from Microsoft and just change your registry key to

[HKEY_CLASSES_ROOT*\shell\Notepad2\command] @="elevate \"C:\Program Files\Notepad2\Notepad2.exe\" \"%1\""
heavyd
  • 65,321
0

Notepad2 can be run as admin with the following procedure: https://www.flos-freeware.ch/development-releases/notepad2-FAQs.html#uac-editing

In short:

  • in the command line, the parameters used to elevate Notepad2 privileges are: /n /u

If you want a shortcut to run program asa admin, right click to shortcut, then select Properties, then click on Advanced button and select checkbox "Run as administrator". Save!

Enjoy!

luciandex
  • 131
0

Take a look at Elevator. It adds a context menu "Elevate Me" option, and also allows you to add UAC exlusions for certain programs so that they always open with elevated priviledges. Here's an example of Elevator in action.