Determine When a User Logged In

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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




.



Relevant Pages

  • Indicator to Run One Time
    ... I want my VB6 app to do something different the first time it ... week, before many restarts. ... group that would delete the log file, then create it the first time the ...
    (microsoft.public.vb.general.discussion)
  • Re: Indicator to Run One Time
    ... triggered by my app, ... from a remote location the first time it runs. ... week, before many restarts. ... Startup group that would delete the log file, ...
    (microsoft.public.vb.general.discussion)
  • Re: Indicator to Run One Time
    ... triggered by my app, ... week, before many restarts. ... Startup group that would delete the log file, ...
    (microsoft.public.vb.general.discussion)
  • Re: Indicator to Run One Time
    ... triggered by my app, ... remote location the first time it runs. ... week, before many restarts. ... group that would delete the log file, then create it the first time the ...
    (microsoft.public.vb.general.discussion)
  • Re: Determine When a User Logged In
    ... first time the program is being run. ... I want it to be triggered by my app, ... But that could be a minute ago or last week, before many restarts. ... Startup group that would delete the log file, then create it the first time the program runs. ...
    (microsoft.public.vb.general.discussion)