17
12
I don't want to install PowerToys, I'd rather a simpler solution for this specific problem.
I've tried Ctrl+Shift+Right-Click
.
I've tried adding a registry script, but I get the following error:
Cannot import D:\Admin\Reg\Open command window here (Administrator)\Open command window here (Administrator).reg: The specified file is not a registry script. You can only import binary registry files from within the registry editor.
Any suggestions?
Edit:
Forgot to mention: I've tried the import
facility in regedit
to no avail
1Note that it's only the
runas
verb that gives this the ability to elevate. TheHasLUAShield
only shows the shield. – Deanna – 2015-05-07T08:14:37.353Is it possible to modify it also for files? (right click will open a cmd on location where that file is found) – Royi Namir – 2017-12-25T19:05:32.780
+1; Works great! I'd add
HKEY_CLASSES_ROOT\Directory\shell\runas:Extended=""
etc. so that this appears on the shift+right-click menu rather than the right-click menu. Also, you have-
for keys. Doesn't that delete the keys and sub-values? Shouldn't you leave the existing keys there, or is it probably safe/won't conflict? – Merlyn Morgan-Graham – 2012-03-13T01:01:02.9802@MerlynMorgan-Graham I believe the places that I used the minus are places that typically don't have keys. This is simply protection against anything else being there. In theory, you could have a RunAs PrintServer or something, but I'd assume if someone is doing that, they should know what they're doing.
I work in IT and have seen people try this kind of thing and any attempt to insert better code typically clashes with previous code. Feel free to remove the minus signs. – tophersmith116 – 2012-03-13T04:43:29.520
The fact that you've given it thought gives me enough comfort to use the code you've provided :) – Merlyn Morgan-Graham – 2012-03-13T04:49:09.777