Results 1 to 2 of 2

Thread: improper pc shutdown

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012

    improper pc shutdown

    i want to know or monitor if the computer unit was properly shutdown or not.

    any idea of code for this ? i already googled and others but no result.

  2. #2
    Fanatic Member
    Join Date
    Dec 2014
    VB6 dinosaur land

    Re: improper pc shutdown

    I'd think you'd be wanting to investigate the bootstat.dat file. You'd have to find the format of the binary contents of that file to know what to look for.
    Windows uses a boot status file (%SystemRoot%\Bootstat.dat) to record the fact that it has progressed through various stages of the system life cycle, including boot and shutdown. This allows the Boot Manager, Windows loader, and the Startup Repair tool to detect abnormal shutdown or a failure to shut down cleanly and offer the user recovery and diagnostic boot options, like Last Known Good and Safe Mode. This binary file contains information through which the system reports the success of the following phases of the system life cycle:

    Boot (the definition of a successful boot is the same as the one used for determining Last Known Good status, which was described earlier)


    Resume from hibernate or suspend

    The boot status file also indicates whether a problem was detected the last time the user attempted to boot the operating system and the recovery options shown, indicating that the user has been made aware of the problem and taken action. Runtime Library APIs (Rtl) in Ntdll.dll contain the private interfaces that Windows uses to read from and write to the file. Like the BCD, it cannot be edited by users.
    Link that contained above text

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width