Admin access required for myapp.exe

Multimedia Builder (Legacy Forum)
Forum rules
This forum is now locked but only TEMPORARY. We will see if the spam countermeasures work on the other live forums and if so, the forum will be unlocked.
Note, MMB has been discontinued for a decade.
Locked
pmedia
Posts: 4
Joined: Wed Apr 04, 2018 5:45 am

Admin access required for myapp.exe

Post by pmedia »

when i need admin privileged in my apps
i run this script when my apps starting

Code: Select all

SysCommand("CopyFile","<Embedded>\acsess.txt,<System>\acsess.txt")
Pause("50")
FileExist("<System>\acsess.txt","acsess")
If (acsess=0) Then
Message("running in limited access! ","Please run the software as administrator!")
  Exit()
End

I'm looking for a better solution
I want my software to require administrator access
SO UAC window will appear And will ask the user to give administrator permission to my software

Anyone have an idea?
Or plugin
thank you!
dgilmour
Posts: 515
Joined: Fri Oct 22, 2010 11:29 am
Location: Moskva, Rusko

Re: Admin access required for myapp.exe

Post by dgilmour »

Add this section to your application's manifest:

Code: Select all

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
  <requestedPrivileges>
   <requestedExecutionLevel level="requireAdministrator" uiAccess="false">
   </requestedExecutionLevel>
  </requestedPrivileges>
 </security>
</trustInfo>
pmedia
Posts: 4
Joined: Wed Apr 04, 2018 5:45 am

Re: Admin access required for myapp.exe

Post by pmedia »

thanks for the reply

Where can i edit application's manifest in Multimedia Builder 4.9.8 ?
dgilmour
Posts: 515
Joined: Fri Oct 22, 2010 11:29 am
Location: Moskva, Rusko

Re: Admin access required for myapp.exe

Post by dgilmour »

First, you need to decompress your compiled .exe using UPX packer (upx.exe -d yourapp.exe), then you can use any resource editor (ResHacker for example) to modify manifest resource.
pmedia
Posts: 4
Joined: Wed Apr 04, 2018 5:45 am

Re: Admin access required for myapp.exe

Post by pmedia »

thanks :)
Locked