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

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

Secure Home | Search | About
 Microsoft Applications Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
how to success OpenScManager for local machine when logged in with a user don't have administrator privileges tianc 05-07-2008
Posted by tianc on May 7, 2008, 4:34 am
If you were  Registered and logged in, you could reply and use other advanced thread options
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



Similar ThreadsPosted
Command to show which User logged onto Machine September 1, 2005, 12:01 pm
Domain User -> Configure as Local Administrator December 10, 2005, 12:51 am
local administrator. power user or users.....thanks. May 4, 2006, 11:12 am
RE: Another user logged in? September 18, 2005, 11:22 am
How do I verify System Administrator Privileges in Windows ME November 8, 2005, 12:29 am
Need Password to Access Administrator Privileges on home PC June 6, 2007, 9:34 pm
User privileges March 14, 2006, 2:56 pm
Surfing with User privileges January 28, 2006, 7:37 am
Access to local machine store June 2, 2008, 4:08 am
Machine and User credentials October 9, 2006, 5:10 pm

The site map in XML format XML site map

Contact Us | Privacy Policy