![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How do I run Control Panel Applet as Administrator. Ok, I have a control panel applet that has a legitimate need to run as administrator. Via WMI it needs to write to settings to registry hive HKLM for an associated service. When I run it under a normal administrator account I get an 'Access Denied' error. No problem, I'll just create a manifest and set the requireAdministrator requirement as follows: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity processorArchitecture="x86" version="3.0.16.0" type="win32" name="myapp.cpl"/> <description>My Application control panel applet</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="x86"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="true"/> </requestedPrivileges> </security> </trustInfo> </assembly> Well, no dice! Now I get an error popup that reads 'Illegal value: requested run level'!!! What gives? I expected the LUA to prompt me about allowing elevation, but no such luck! Is this thing brain dead or am I? There doesn't seem to be a way around this. --------------------------------------------- Jean Cyr - Dillobits Software jcyr@dillobits.com - http://www.dillobits.com |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How do I run Control Panel Applet as Administrator. On Mon, 03 Jul 2006 23:19:11 -0400, Jean Cyr <jcyr@dillobits.com> wrote: >Well, no dice! Now I get an error popup that reads 'Illegal value: >requested run level'!!! What gives? I expected the LUA to prompt me >about allowing elevation, but no such luck! Is this thing brain dead >or am I? There doesn't seem to be a way around this. Follow up: Tried the CoCreateInstanceAsAdmin approach on the WMI locator object. No joy... The object doesn't support elevation. As a last ditch attempt to get past this roadblock and move on with further debugging I tried creating a patch using the Compatibility Administrator. Bump... doesn't elevate CPLs. At this point development is dead in the water for Vista preparations. Hope MS will see fit to clearing this up soon. :-( |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How do I run Control Panel Applet as Administrator. IIRC, a cpl is just a DLL and runs in the control panel process, thus you can't elevate it. You need to rewrite (or separate the admin parts) as an exe or other external process that UAC can elevate. "Jean Cyr" <jcyr@dillobits.com> wrote in message news:5u7la21nev3qkrtgbs80v8artaiapbka5i@4ax.com... > On Mon, 03 Jul 2006 23:19:11 -0400, Jean Cyr <jcyr@dillobits.com> > wrote: > >>Well, no dice! Now I get an error popup that reads 'Illegal value: >>requested run level'!!! What gives? I expected the LUA to prompt me >>about allowing elevation, but no such luck! Is this thing brain dead >>or am I? There doesn't seem to be a way around this. > > Follow up: Tried the CoCreateInstanceAsAdmin approach on the WMI > locator object. No joy... The object doesn't support elevation. As a > last ditch attempt to get past this roadblock and move on with further > debugging I tried creating a patch using the Compatibility > Administrator. Bump... doesn't elevate CPLs. > > At this point development is dead in the water for Vista preparations. > Hope MS will see fit to clearing this up soon. :-( |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How do I run Control Panel Applet as Administrator. Chris Altmann wrote: > IIRC, a cpl is just a DLL and runs in the control panel process, thus > you can't elevate it. You need to rewrite (or separate the admin parts) > as an exe or other external process that UAC can elevate. > There's an program called 'RunLegacyCPLElevated' that is essentially an elevated rundll32 (you call it with the same parameters). I just put in an elevate button that reruns the cpl using that.. it'll do for the betas until MS put in a proper mechanism. Tony |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Control panel applet missing | Vista General | |||
| mouse applet missing from Control Panel | Vista General | |||
| Control panel applet & chkdisk log | Vista General | |||
| NVIDIA Control Panel Applet 1.3.7.37 | Vista General | |||
| Color Management Applet in Control Panel | Vista music pictures video | |||