Page 1 of 1

Force Admin Rights / Admin Mode on Startup?

Posted: Tue Dec 01, 2009 11:43 am
by MasterchiefJB
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

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Tue Dec 01, 2009 3:45 pm
by trevordevore
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

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Tue Dec 01, 2009 4:30 pm
by MasterchiefJB
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;)

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Tue Dec 01, 2009 4:32 pm
by trevordevore
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.

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Fri Dec 11, 2009 12:19 pm
by ludis
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.

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Fri Dec 11, 2009 3:22 pm
by trevordevore
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.

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Fri Dec 11, 2009 4:24 pm
by FourthWorld
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.

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Fri Dec 11, 2009 5:19 pm
by ludis
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?

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Fri Dec 11, 2009 5:23 pm
by FourthWorld
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?

Re: Force Admin Rights / Admin Mode on Startup?

Posted: Fri Feb 05, 2010 9:01 am
by gayasoft
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