SwamyN
asked on
Using VB6 or dot net, how do i obtain windows login details?
I need to find out how many times and WHEN a user has logged in or out after booting up a PC.
If possible, I also need to find out when and how many times after boot up, a PC was put into hibernation mode
If possible, I also need to find out when and how many times after boot up, a PC was put into hibernation mode
You can use the wmi code creator tool for creating wmi codes. Have a look http://www.microsoft.com/downloads/details.aspx?familyid=2cc30a64-ea15-4661-8da4-55bbc145c30e&displaylang=en
ASKER
i got the sample code running, and it gives me the username.....is there a parameter i can pass to it that would return login and logout times of a user?
Hello Swamy ,
You can download WMI Toolkit from microsoft and you can find out all the methods there . please try that way.
warm regards
sree
You can download WMI Toolkit from microsoft and you can find out all the methods there . please try that way.
warm regards
sree
You need to download WMI SDK also
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the above code snippet will give you the log on time
You can find a sample code in c# for getting Windows logon using wmi Here
http://alperguc.blogspot.com/2008/11/c-read-windows-logon-user-name-in-wmi.html