A
aye2003
I am writing an application that needs to distinguish the first time it is
run after the PC is rebooted from the subsequent runs. I can think of a
possible solution: use Environment.TickCount to calculate the DateTime the
system was started, look for a dummy file's modified time to find out if the
dummy file was modified before or after the system was started, then touch
the dummy file to update its modified time stamp.
Is there a direct way to find out the DateTime when the system was started?
Any better way of determining if an application is run the first time after
the system starts? I also looked at the Run and RunOnce register keys, but
can't figure out how to use them for this purpose.
Angie
run after the PC is rebooted from the subsequent runs. I can think of a
possible solution: use Environment.TickCount to calculate the DateTime the
system was started, look for a dummy file's modified time to find out if the
dummy file was modified before or after the system was started, then touch
the dummy file to update its modified time stamp.
Is there a direct way to find out the DateTime when the system was started?
Any better way of determining if an application is run the first time after
the system starts? I also looked at the Run and RunOnce register keys, but
can't figure out how to use them for this purpose.
Angie