Force Admin Rights / Admin Mode on Startup?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
MasterchiefJB
Posts: 76
Joined: Sat Nov 07, 2009 7:43 pm

Force Admin Rights / Admin Mode on Startup?

Post by MasterchiefJB » Tue Dec 01, 2009 11:43 am

Hi all,

I nearly finished the developement of my little system tool, but I would like to know how I can force the User to run this application with admin right´s?
This is important under Vista and Win7.

So is there a way to force my application to run in admin mode?

Thanks,
Masterchief

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by trevordevore » Tue Dec 01, 2009 3:45 pm

Here is a lesson that shows how to embed a manifest in an executable.

You will need Rev 4.0 for it to work though as the 3.x engines (maybe 2.9?) were designed in such a way that embedding manifests wouldn't work. 4.0 should fix this though.

Adding Windows Vista Manifest To a Revolution Executable
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

MasterchiefJB
Posts: 76
Joined: Sat Nov 07, 2009 7:43 pm

Re: Force Admin Rights / Admin Mode on Startup?

Post by MasterchiefJB » Tue Dec 01, 2009 4:30 pm

Thank you very much! That´s exactly what I was looking for! But is there really no way to do this with Revolution 3.5? Otherwise I will consider to upgrade;)

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by trevordevore » Tue Dec 01, 2009 4:32 pm

You can give it a try but I think the operation ends up corrupting the exe. Definitely try the technique out on a 4.0 trial before you commit though. I haven't had a chance to test it yet but the engine change log says it should work.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

ludis
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3
Joined: Thu Nov 05, 2009 11:01 pm
Location: Utrecht, Netherlands
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by ludis » Fri Dec 11, 2009 12:19 pm

Unhappily I get an error message when trying to embed a manifest.
I'm on Mac OS X 10.6.2, Revolution Studio 4 build 950.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by trevordevore » Fri Dec 11, 2009 3:22 pm

Embedding a manifest to elevate to admin rights is something you do on Windows, not OS X. Can you explain your workflow?

One thing I just noticed in the standalone builder settings under the Windows tab - you can now set the UAC Execution Level for the exe you build. Options are Default, Same as Invoker, Highest Available and Require Administrator. So no need to embed the manifest after the fact. Just change the setting before building the standalone.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9856
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by FourthWorld » Fri Dec 11, 2009 4:24 pm

Rev v4.0's standalone builder now includes an option in the Windows tab to let you specify the access privileges for the app. Apparently it makes the manifest for you, so you shouldn't have to worry about making your own.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ludis
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3
Joined: Thu Nov 05, 2009 11:01 pm
Location: Utrecht, Netherlands
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by ludis » Fri Dec 11, 2009 5:19 pm

Indeed does the standalone builder have an option to specify access privileges for Win applications, and that option is available on the Mac version of Revolution 4 as well. That's very nice, but now it returns an error message whenever I choose another option but the default one. Does that mean I can't embed a manifest in a Windows standalone, using Revolution on a Mac?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9856
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Force Admin Rights / Admin Mode on Startup?

Post by FourthWorld » Fri Dec 11, 2009 5:23 pm

Good question. I haven't used it yet, but will be revamping my own standalone builder shortly so we'll at least be able to determine whether the problem is with the IDE or the new engine-based building process.

Anyone else here have a bad experience trying to use the new UAC option in Rev 4's standalone builder?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

gayasoft
Posts: 19
Joined: Sat Jul 18, 2009 7:40 pm

Re: Force Admin Rights / Admin Mode on Startup?

Post by gayasoft » Fri Feb 05, 2010 9:01 am

yes me actually.

Seems like you need revEnterprise for it which is hopefully just a bug / oversight, not a desired punishment of people paying to get windows deploy to then not get it correctly

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”