K
Kahlua Bear
Hi, Not sure if this is the right forum/place to post this question, as this is more of a Windows System related question, but still wanted to post to see if I could get any answers from people familiar with WIndows.
I've started windows programming recently, and I was trying to find out how to get the latest Shut Down time for the device.
I know that the Windows Event Log event id 1704 shows the shutdown time when properly shutdown, and 6008 for unexpected shutdowns.
I was wondering however, how Event ID 6008 Works. I wasn't expecting it to, but it seems like windows manages to get the proper time for Event ID 6008 even when I just pull the plug on my device.
So, if I pull my plug at say 6:00pm, and turn on my computer back up at 6:10pm, then the event log leaves an event with if 6008 on 6:10pm, saying the computer shut down at 6:00pm. From this, I had two questions.
1. How does Windows keep track of the time it was shutdown? How does it know it got shutdown at 6:00pm when the plug was pulled thus had no time to run any procedures?
2. If I want to know the Last Shutdown time for Windows reliably, even during events such as blackouts, would checking for event 1704 and event 6008 be a reliable method? Would there be cases where windows fails to leave these logs or write wrong values for these logs?
Thank you.
Continue reading...
I've started windows programming recently, and I was trying to find out how to get the latest Shut Down time for the device.
I know that the Windows Event Log event id 1704 shows the shutdown time when properly shutdown, and 6008 for unexpected shutdowns.
I was wondering however, how Event ID 6008 Works. I wasn't expecting it to, but it seems like windows manages to get the proper time for Event ID 6008 even when I just pull the plug on my device.
So, if I pull my plug at say 6:00pm, and turn on my computer back up at 6:10pm, then the event log leaves an event with if 6008 on 6:10pm, saying the computer shut down at 6:00pm. From this, I had two questions.
1. How does Windows keep track of the time it was shutdown? How does it know it got shutdown at 6:00pm when the plug was pulled thus had no time to run any procedures?
2. If I want to know the Last Shutdown time for Windows reliably, even during events such as blackouts, would checking for event 1704 and event 6008 be a reliable method? Would there be cases where windows fails to leave these logs or write wrong values for these logs?
Thank you.
Continue reading...