Re: Elevating via UAC in C++



Hey Jochen,

Aah! That's a pretty good idea as I the code I want to execute is right
on entry point.

Cheers for the tip! :)

Nick.

"Jochen Kalmbach [MVP]" <nospam-Jochen.Kalmbach@xxxxxxxxx> wrote in message
news:uhRf7xGWIHA.3532@xxxxxxxxxxxxxxxxxxxxxxx
Hi NickP!
I know that I can cause the UAC to be evoked for an entire process,
but I would like to be able to display the UAC before I call a particular
function in my code, is this possible? Or can you only elevate the
entire application?

You can only elevate the whole process...

You you could "re-execute" your process with ShellExecute and "RunAs"...
this will trigger the UAC Dialog... and starts your program again...

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/


.



Relevant Pages

  • Re: Firewall API in Vista
    ... for exe that's the way to please the UAC ... Many networks APIs in Vista need evalating privilege to execute. ... script works as in XP. ... I looked for an elevate command, ...
    (microsoft.public.win32.programmer.networks)
  • Re: Search for word or phrase in .pas & .dfm files
    ... windows explorer in vista? ... Click Show All Locations (elevate if UAC is enabled) ... Find and select DFM files ...
    (borland.public.delphi.non-technical)
  • Re: Some questions
    ... what is sense of this "enhanched security" if this so called "UAC (Elevate without prompting)" is just useless crappy feature? ...
    (microsoft.public.windows.vista.general)
  • elevate script permission for vista uac
    ... Any tips on how to get around UAC for scripts requiring major system changes such as WMI workstation rename. ... Can you elevate the permission so the user gets no messages. ...
    (microsoft.public.scripting.vbscript)
  • Re: Elevating via UAC in C++
    ... I would like to be able to display the UAC before I call a particular function in my code, ... Or can you only elevate the entire application? ... My blog about Win32 and .NET ...
    (microsoft.public.vc.language)