1

Possible Duplicate:
Vista UAC, Access Elevation and .Net

I have a special feature in my AP, this feature need to get administrator right in Vista. Is there any MS API to pop up the UAC dialog when I click the button? Because I don’t want the end-user to see UAC dialog during startup, the feature is really special, not every user will do that. Thanks in advance.

Community
  • 1
  • 1
Yigang Wu
  • 3,596
  • 5
  • 40
  • 54
  • Similar question [here](http://stackoverflow.com/questions/78696/vista-uac-access-elevation-and-net). – Xn0vv3r Jan 20 '09 at 11:32

1 Answers1

0

Nope, MS has spent lots of time to make programmatic access to that button impossible! If you could do such a thing, UAC would be absolutely useless. You might encapsulate the functionality as a something (e.g. a Windows service) running with admin privileges. on which you'll call a method from the non-elevated process.

Mehrdad Afshari
  • 414,610
  • 91
  • 852
  • 789
  • I think he wants to elevate his process in the middle of it, as discussed here: http://stackoverflow.com/questions/78696/vista-uac-access-elevation-and-net – Martin Plante Jan 20 '09 at 14:31
  • But this doesn't make the process click that "continue" button. And after elevation, the process will be elevated forever which is not what the question asks. – Mehrdad Afshari Jan 20 '09 at 19:01