Re: Determine When a User Logged In
- From: "expvb" <nobody@xxxxxxx>
- Date: Sat, 26 Jul 2008 11:43:28 -0400
See NetUserGetInfo() and usri2_last_logon member in USER_INFO_2 structure.
You will have to use several API calls before using it, such as
GetUserName/GetComputerName/Ex.
Another way is putting your application in HKLM\...\Run at install time with
a command line, like the following:
<AppPath>\MyApp.exe /startup
The Command() function returns the command line options. You can use that to
save the date and time and exit.
The Run entries in HKLM are executed for every user that logs in, including
terminal services and fast user switching.
.
- Follow-Ups:
- Re: Determine When a User Logged In
- From: MikeD
- Re: Determine When a User Logged In
- References:
- Indicator to Run One Time
- From: Rick Raisley
- Determine When a User Logged In
- From: Rick Raisley
- Indicator to Run One Time
- Prev by Date: Re: Application error when using VB6 Intrinsic Controls
- Next by Date: Re: VB 2005 and passing a parameter...
- Previous by thread: Re: Determine When a User Logged In
- Next by thread: Re: Determine When a User Logged In
- Index(es):