2

Is there a command I can run, outside of the Windows GUI, to change a program so it will always run as administrator? I have several hundred .EXE files to change, and it's tedious to touch each one via File Explorer, so I would prefer to batch process them.

0

1 Answer 1

3

Yes, you can!

Generate a script which makes a .REG file to add new entries to the registry, one per each executable you need to adjust, to flip the bit and allow the app to Run As Administrator. Examples shown below are for an executable named "BAR.EXE" in "C:\Program Files (x86)\FOO\" and, believe me, the tilde and space before RUNASADMIN is essential.

For all users:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers] "C:\Program Files (x86)\FOO\BAR.EXE"=
"~ RUNASADMIN"

Or, for one particular user:

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers] "C:\Program Files (x86)\FOO\BAR.EXE"=
"~ RUNASADMIN"

4

You must log in to answer this question.

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