I have a file that, whenever I run it, asks for administrator permissions. How can I disable this so I can use it on other computers?
Asked
Active
Viewed 1.8k times
1 Answers
3
Try to start the program from a batch file that first sets an environment variable
set __COMPAT_LAYER=RunAsInvoker
and check if it runs as the original user then (without needing elevation). Note that even when running without needing elevation, that does not mean it will work that way.
If yes, there are three possible reasons this program requires elevation
- Magic filename hardcoded in Windows (like setup.exe, install.exe)
- File has a manifest lying nearby (
somefile.exehassomefile.exe.manifest) that requires elevated privileges - File has an embedded manifest that requies elevated privileges
First one is easy to solve (rename it), second as well (delete the manifest), for the third you'd have to extract the manifest with a resource extraction tool (which will invalidate the digital signature if any).
If no, the program checks for privileges and launches the dialog manually (by code). In that case if you don't have the source code to recompile the application, you are out of luck.
mihi
- 3,447