Is there any way to make an .exe
file runs automatically as administrator?
Suppose that I logged in with a Guest user in my Windows; now when I want to run some programs such as resmon.exe it requires to run it as Administrator and the below windows pop up :
I want to know, if I have password of the Administrator, is there any way to make this process automatically done when I double click on resmon.exe
?
Update :
I do a right-click on the program and select properties and change the settings in security tab as below :
But when I want to check Run this program as Administrator
in compatibility tab, it is not active! why?
Note : I test other files that those are not in Windows directory,and all the options in compatibility tab are active. I move the resmon.exe
file from Windows directory to another drive (D:) and options activated!!! why?
Best Answer
In the properties of the exe you can set a compatibility option for this. There is also a PE within the SysInternals Suite called ShellRunAs.exe that may prove useful.
update: For system executable files that will not let you edit compatibility options you might be able to work around this by creating a shortcut of that exe and then within the properties of that shortcut you can select "Advanced" and set "run as admin".
If that does not work for your use case then the solution would likely require custom registry edit, which might not be appropriate to mention here.