make exe file automatically run as administrator

7,026

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.

Share:
7,026
TheGoodUser
Author by

TheGoodUser

Updated on September 18, 2022

Comments

  • TheGoodUser
    TheGoodUser over 1 year

    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 :

    enter image description here

    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 :

    enter image description here

    But when I want to check Run this program as Administrator in compatibility tab, it is not active! why?

    enter image description here

    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?

  • TheGoodUser
    TheGoodUser over 9 years
    Thank you dear jRadd, my problem solved for some files, but not for all files!Would you please check Update section in my question?
  • jredd
    jredd over 9 years
    Ahh, I didn't think about that. I think I have the solution. Right click resmon.exe and Send to--->desktop(create a shortcut). Now in the properties of that shortcut click "Advanced" and then "Run as admin"
  • TheGoodUser
    TheGoodUser over 9 years
    Not works!in the properties of short cut there is no Advanced tab! there is compatibility, and in the compatibility all options are not active !
  • jredd
    jredd over 9 years
    Yikes, I just tried it on my Windows 7 x64 (professional) using resmon.exe and it worked. What version are you on?
  • TheGoodUser
    TheGoodUser over 9 years
    It's weird!!! I have also Windows-7 x64 professional v6.1 service pack-1!!!
  • Sun
    Sun about 9 years
    Copy resmon.exe out of Windows folder and put it somewhere else like c:\temp and set it to run as Administrator.