I want to programmatically create a logon account in Windows Vista with UAC enabled.
I have an OCX that creates a user account and it has worked for years on NT and XP, but now our application fails with Access Denied when creating the account on Vista. If our customers turn off UAC then setup that app it works fine. However, it is not acceptable to have our users turn off UAC AND REBOOT before finishing configuring our app.
Best Answer
If you run your application with administrator privileges in Vista, then does it work?
You can also create a COM object with elevated privileges using this code:
Running under UAC, it will present an elevation dialog. The object will run out of process in dllhost (I think) but with full admin privileges.
Also look at the step by step guide for UAC in Vista.