How to run standalone with administrator rights

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alemrantareq
Posts: 203
Joined: Wed Jul 23, 2008 8:46 am

How to run standalone with administrator rights

Post by alemrantareq » Wed May 27, 2015 7:12 am

hi, I want to add Vista Manifest to my standalone so that my application can run without asking admin rights; but unfortunately the links to the tutorial I found here are dead. So if anyone can guide me through this would be very much appreciated. Thanks...

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: How to run standalone with administrator rights

Post by MaxV » Thu Jun 04, 2015 4:08 pm

You can with a separate file:
A manifest is a XML file that contains settings that informs Windows how to handle a program when it is started. The manifest can be embedded inside the program file (as a resource) or it can be located in a separate external XML file. If the manifest is placed in a separate file, then the file must be located in the same folder as the executable file and it must have same filename as the program file, but with a ".manifest" filename extension added at the end (e.g "MYAPP.EXE.manifest").
for example:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="9.0.0.0"
    processorArchitecture="x86"
    name="VI.EXE"
    type="win32"
/>
<description>SamLogic VI Editor</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>
Please read this: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

alemrantareq
Posts: 203
Joined: Wed Jul 23, 2008 8:46 am

Re: How to run standalone with administrator rights

Post by alemrantareq » Sun Jun 07, 2015 9:09 pm

Thanks Mr. MaxV for replying me. I've already found the simple solution to do this.

In the Main Menubar, File > Standalone Application Settings > Windows tab

Then simply change the UAC Execution Level from Default to Require Administrator and save the stack. Now when the standalone application will be generated, it will automatically embed the manifest with the standalone :)

Post Reply