October 18, 2010

szh1 szh1
Lab Rat
100 posts

Require administrator privileges

 

I am making an application that edits the system registry. How can I make the program require administrator privileges? In Windows Vista and 7, I can use a Manifest file with

  1. <requestedExecutionLevel level="requireAdministrator" />
Will this work in Windows XP?

4 replies

October 18, 2010

stuk stuk
Ant Farmer
523 posts

Xp doesn’t have a UAC.

October 18, 2010

szh1 szh1
Lab Rat
100 posts

Will I get an error when I try to edit the registry from a non-admin account?

November 1, 2010

CodeDaemon CodeDaemon
Lab Rat
13 posts

stuk wrote:
Xp doesn’t have a UAC.

Nevertheless, I have the same problem with Windows7.

My situation:
I have a application that working as a windows service (or linux daemon).
And the application that represent “Control Panel” for this service/daemon, it can install/uninstall and start/stop this service.

Under windows I build this project with QtSDK 4.7.0 (mingw).

In case when UAC is enabled, I have error “unable to install service” because by default my ControlPanel does not have are embedded manifest with desired privileges.

But if UAC is disabled then all works fine!

August 12, 2011

tekoscott tekoscott
Lab Rat
3 posts

I know this is an old post but did you ever find a fix for this. I am currently in the same situation and need to elevate the priveleges of my application in order for it to work as required.

I have managed to find out that I need to include a manifest file within my application in order to achieve this but I cannot find any resources on how to do this on the net.

Thanks in advance

Scott

 
  ‹‹ Widget’s geometry before first show      rcc: File does not exist ››

You must log in to post a reply. Not a member yet? Register here!