Jump to content

how to success OpenScManager for local machine when logged in with a user don't have administrator p


Recommended Posts

Guest tianc
Posted

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

  • Replies 0
  • Created
  • Last Reply

Popular Days

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...