Force a program to run *without* administrator privileges or UAC?
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker]
@="Run without privilege elevation"
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker\command]
@="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""
Save this text in <name_of_file>.reg
and add it to the Windows Registry. (Double-clicking on it should do the trick.)
Afterwards, right-click the app you'd like to run without administrative privileges and select "Run without privilege elevation".
In some cases - small amount 0.1% of programs may ask twice about UAC prompt.
Save to nonadmin.bat
:
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
Now you can drag and drop programs to this to run them without admin.
This doesn't require admin privileges as changing that registry key does. Also you won't clutter the context menu.
Based on Vom's answer
Update: Should now work with programs that have spaces in name as well.
I hope I'm not too late to the party, but I was looking for a similar question and without seeing an answer here I found out that Windows' builtin RunAs
command, when run as administrator, can do that with /trustlevel
switch.
RUNAS /trustlevel:<TrustLevel> program
/showtrustlevels displays the trust levels that can be used
as arguments to /trustlevel.
/trustlevel <Level> should be one of levels enumerated
in /showtrustlevels.
This worked in my case. Ironically, starting a program explicitly without elevation requires an elevated command prompt. Go figure. :) I hope it helps you.