Determine When a User Logged In
- From: "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet>
- Date: Fri, 25 Jul 2008 15:37:26 -0400
I now realize that it doesn't matter when Windows starts, or when the PC is
turned on. As I'm trying to determine the state of a program run as the
user, what I need to determine is when a user logged into his PC. Then when
my program first runs, it will log its start time, and compare its previous
start time with the time the user last logged in. If the last run time was
before when the user logged in, then it's the first time the program is
being run.
So - does anyone have any ideas on how to determine the DATE & TIME that the
current user Logged In to his PC? A Google hasn't gotten me anything, yet.
--
Regards,
Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:%23gbP5gZ7IHA.3696@xxxxxxxxxxxxxxxxxxxxxxx
Basically, I want my VB6 app to do something different the first time it
runs, after the PC is restarted, than any other times. I want it to be
triggered by my app (not just have an app in the Startup group), so if it
is never run, it isn't needed. But I want my app to update a data file
from a remote location the first time it runs. If run again, before the
computer is restarted, I don't want it to update the data file.
So, how do I determine that it has run once? I can make a log file, of
course, to determine it has run. But that could be a minute ago or last
week, before many restarts. I guess I could put a batch file in the
Startup group that would delete the log file, then create it the first
time the program runs. That would work, but seems kludgy.
Any better ideas?
--
Regards,
Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net
.
- Follow-Ups:
- Re: Determine When a User Logged In
- From: Steve Gerrard
- Re: Determine When a User Logged In
- From: expvb
- Re: Determine When a User Logged In
- From: Steve Easton
- Re: Determine When a User Logged In
- References:
- Indicator to Run One Time
- From: Rick Raisley
- Indicator to Run One Time
- Prev by Date: Re: Extract milliseconds from a date
- Next by Date: Re: Knowing the caller form in VB6
- Previous by thread: Re: Indicator to Run One Time
- Next by thread: Re: Determine When a User Logged In
- Index(es):
Relevant Pages
|