Guest tianc Posted May 7, 2008 Posted May 7, 2008 Hello All, I logged in as a local user which do not have administrator privileges on Vista. Then I tried to use: LogonUserA(user, domain, password, LOGON32_LOGON_NEW_CREDENTIALS, LOGON32_PROVIDER_WINNT50, &token); ImpersonateLoggedOnUser(token); OpenSCManagerA(machine, NULL, SC_MANAGER_CREATE_SERVICE); It successed when the target machine is a remote machine, but failed for the machine itself. I guess LOGON32_LOGON_NEW_CREDENTIALS use the credentials I put for the remote connection but not for the local, so I have tried change LOGON32_LOGON_NEW_CREDENTIALS to some other values but it can't work. Is there some other solution for this? Thanks, tianc Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.