0

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.

2
  • 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, 2012 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. Dec 19, 2012 at 12:45

2 Answers 2

1

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.

0

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.

You must log in to answer this question.

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