Run .exe as admin

Discussion in 'Windows 8' started by lunar21, Dec 22, 2013.

  1. lunar21

    lunar21 MDL Addicted

    Dec 14, 2008
    753
    270
    30
    Hello all,

    I know of the basic way to make a program run as an admin (rightclick, Properties -> Compatibility - > Run this program as an administrator)

    Prob I have found out, If I put the .exe on another site for someone to download, when they download it to their PC, or if I just simply move the .EXE to another part of the PC, the admin rights are taken off.

    If there a way to keep the "Always run as an administrator" on there at all times, can you please tell me?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. silashack

    silashack MDL Novice

    Dec 21, 2013
    15
    1
    0
    probably have to make a batch file adding:-

    runas /user:Administrator Example1.exe

    name it the same as the exe and run that

    simplest
     
  3. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #3 Mr Jinje, Dec 22, 2013
    Last edited by a moderator: Apr 20, 2017
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,222
    84,900
    340
    #4 abbodi1406, Dec 22, 2013
    Last edited by a moderator: Apr 20, 2017
    You can add manifest file beside it

    save as ProgramName.exe.manifest
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="abc" type="win32"></assemblyIdentity>
    <description>abc</description>
    <dependency>
    <dependentAssembly>
    <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
    </dependentAssembly>
    </dependency>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
    <requestedPrivileges>
    <requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
    </requestedPrivileges>
    </security>
    </trustInfo>
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
    <application>
    <!--The ID below indicates application support for Windows 7 -->
    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
    </application> 
    </compatibility>
    </assembly>