How to log-on a windows xp user
-
Hi there. I'm trying to write a c# code that will automaticaly initiate a user login, if the user is logged off for a given period of time. I've tried using the ADVAPI32.DLL's function LogonUser, but apparently that is used for impresonation (am i wrong?). So, how is that done? In addition, i failed to find a way to check if a specific user is logged on or not. Any idea? Thanks, SummerBulb
-
Hi there. I'm trying to write a c# code that will automaticaly initiate a user login, if the user is logged off for a given period of time. I've tried using the ADVAPI32.DLL's function LogonUser, but apparently that is used for impresonation (am i wrong?). So, how is that done? In addition, i failed to find a way to check if a specific user is logged on or not. Any idea? Thanks, SummerBulb
Although I believe you can write C# code in a service that will run when a user is logged off, I doubt you can log on through such code.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi there. I'm trying to write a c# code that will automaticaly initiate a user login, if the user is logged off for a given period of time. I've tried using the ADVAPI32.DLL's function LogonUser, but apparently that is used for impresonation (am i wrong?). So, how is that done? In addition, i failed to find a way to check if a specific user is logged on or not. Any idea? Thanks, SummerBulb
-
How are you planning to run your code while there is no user logged in? Do you not think this defeats the purpose of having a login?
Life goes very fast. Tomorrow, today is already yesterday.
The code will run as a service. I've already managed to run a c# application as a service. That's the easy part. Although, is should be takan into consideration that in order to run a c# app in th logon window, is has to run under SYSTEM. That might make things more complicated.
-
Hi there. I'm trying to write a c# code that will automaticaly initiate a user login, if the user is logged off for a given period of time. I've tried using the ADVAPI32.DLL's function LogonUser, but apparently that is used for impresonation (am i wrong?). So, how is that done? In addition, i failed to find a way to check if a specific user is logged on or not. Any idea? Thanks, SummerBulb
Solution found. Not by using an app, but by regidtry configuration. see: http://support.microsoft.com/kb/315231[^] Thanks.