Tony,
Can you post the Manfest file you used here? What setting are you using in
your manifest, higest available, what?
josh
http://windowsconnected.com
"Tony Hoyle" <TonyHoyle@nospam.nospam> wrote in message
news:OHdQVBHgGHA.3916@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I've been testing my app on vista beta 2 and have hit a roadblock with
> LUA.
>
> One part of the app is a control panel applet. It exists solely to
> configure global settings used by the service, so it needs access to
> administrator priviliges to open the service control manager and to write
> to HKLM.
>
> When I started it as administrator it immediately barfed saying it
> couldn't open the SCM. No problem... I setup a manifest in the file set
> to requireAdministrator. This didn't work!
>
> It seems that control panel applets don't respect manifests at all.. which
> means I'm screwed, basically.
>
> I could rearchitect the file a bit.. I could do it with a priviliged
> thread etc. but I can't see any way of doing it - the documentation talks
> about rewriting the thing into a COM object (not an option given the
> timescale and the amount of testing that would require), or passing
> special flags to ShellExecute and running it as an external app - which is
> messy, would require multiple windows to be up etc.
>
> I even tried asking for the admin username/password & doing an impersonate
> but LUA thwarts me again (my boss liked this version as he's mostly an OSX
> user and wants a little padlock icon ideally.. can't see how that would be
> implementable in LUA).
>
> A similar problem exists with the server parts - several of them can be
> run standalone as an unprivileged user (so I can't use
> requireAdministrator), but there are operations that need admin access..
> now these no longer work for administrators. I just need to elevate
> privileges for maybe 2 or 3 instructions then back again.
>
> How have others solved this?
>
> Tony