LOGON Problem
-
Hi, There. I Wrote a service in XP, That runs a program. For Network Access I need to logon as specific user. Have anybody An idea, suggestion,link,API,help ... ?:confused: Logon Can Be on local or remote computer. Thanks,
-
Hi, There. I Wrote a service in XP, That runs a program. For Network Access I need to logon as specific user. Have anybody An idea, suggestion,link,API,help ... ?:confused: Logon Can Be on local or remote computer. Thanks,
Check the lpServiceStartName parameter of CreateService()[^]. Make sure this user has access to to required network resource.
suhredayan
There is no spoon. -
Check the lpServiceStartName parameter of CreateService()[^]. Make sure this user has access to to required network resource.
suhredayan
There is no spoon.Thanks a lot But, Do You Mean That I Can LogOn To System via CreateService() ? i.e I Can Determine the UserName and Password In this Function !!!Or a service Can Act As Users? It is Something new for ME, Would you pls, Discuss A little about your Idea?
-
Thanks a lot But, Do You Mean That I Can LogOn To System via CreateService() ? i.e I Can Determine the UserName and Password In this Function !!!Or a service Can Act As Users? It is Something new for ME, Would you pls, Discuss A little about your Idea?
M.Mehrdad.M wrote: Do You Mean That I Can LogOn To System via CreateService() By default when you double click a exe it runs under the same user account by which you logged on the the system. But a service starts executing before a user login to the system. So you have to say to the system, under which user account the service should be run, this should be done while the service is created/registered to the system. CreateService() is the API to Create/register the service with the system and lpServiceStartName & lpPassword are parameters through you say to the system, under which user account the system should run your application as service.
suhredayan
There is no spoon. -
Hi, There. I Wrote a service in XP, That runs a program. For Network Access I need to logon as specific user. Have anybody An idea, suggestion,link,API,help ... ?:confused: Logon Can Be on local or remote computer. Thanks,
Is
LogonUser()
what you are looking for?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown