I have a application need to run under Administrator right, If I run it with Guest user account, after click the UAC dialog, using Windows API to get the current user folder in AP will be changed to Administrator folder, not Guest folder. How to solve it?
0
votes
Not a programming question. Check superuser.com
- popester
This actually does sound like a programming question- It sounds to me like Yigang Wants to programatically control the location where the location, which would require finding the uid that clicked "ok"on the UAC...
- atk
Yigang, This kind of thing can generally be answered with a search on MSDN. You probably need to get your parent process's active user (start by searching msdn.com for GetCurrentProcessID). However, this may be easier if you include the code that triggers the UAC - are you calling CreateProcessAsUser, or executing from the command line, or triggering the UAC in another way?
- atk