Search code examples
c#winapibios

C# - how do i get last bios time?


Hello i need to get the last bios time in my c# application. (not the current bios date or last boot date, but the bios time from task manager)

the bios time im looking for (ref image)

is this information saved in registry? how exactly can i achieve it?


Solution

  • It's stored in the registry, here in this key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
    

    in this value FwPOSTTime, in milliseconds.

    For example:

    enter image description here

    enter image description here