Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a right-click explorer menu that allows me to open a file in Notepad++, which works pretty good. Very convenient. It takes a small registry hack (HKEY_CLASSES_ROOT*\shell), but no worries... unless the file is in a protected folder requiring Admin access to write.

Is there a way to make a registry hack that allows me to right-click on a file and see an option to open the file in Notepad (I can figger out Notepad++) under administrative privileges? It's OK if I get prompted for the elevation confirmation, I just want to right click on the file and be able to edit it.

share|improve this question
There is a reason that programs are no longer run as admin by default: if anything goes wrong (bug, user error, etc.), you want to limit the damage. In general, it is a bad idea to run anything as admin unless it is ABSOLUTELY necessary. Just save a copy somewhere else, and move that to the protected location when you are done. A bit of a hassle, yes, but it could potentially avoid a much larger problem later on down the road. That is my two cents. If you really want to do it anyway, just remember that I warned you. – user130039 Dec 17 '12 at 0:28
I get that; I do. But on some right-click options, it marks it as an administrative privilege-using task. You have to allow it to run under elevated permissions. I want to do the same thing for a custom task that I created. – Jeremy Holovacs Dec 19 '12 at 12:45

You could try using the runas command as follows: runas /noprofile /user:SomeAdminUser notepad.exe %1 A CMD window will open asking for the password of SomeAdminUser, after which notepad will launch.

share|improve this answer

You can use the SendTo submenu. Just put a shortcut in your SendTo folder that names the program and elevation status desired in its Properties.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .