How do I find the install time and date of Windows?

后端 未结 20 1171
孤街浪徒
孤街浪徒 2020-12-12 11:36

This might sound like a little bit of a crazy question, but how can I find out (hopefully via an API/registry key) the install time and date of Windows?

The best I c

相关标签:
20条回答
  • 2020-12-12 12:09

    I find the creation date of c:\pagefile.sys can be pretty reliable in most cases. It can easily be obtained using this command (assuming Windows is installed on C:):

    dir /as /t:c c:\pagefile.sys
    

    The '/as' specifies 'system files', otherwise it will not be found. The '/t:c' sets the time field to display 'creation'.

    0 讨论(0)
  • 2020-12-12 12:09

    You can do this with PowerShell:

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' -Name InstallDate |
        Select-Object -Property @{n='InstallDate';e={[DateTime]::new(1970,1,1,0,0,0,0,'UTC').AddSeconds($_.InstallDate).ToLocalTime()}}
    
    0 讨论(0)
  • 2020-12-12 12:10

    Open command prompt, type "systeminfo" and press enter. Your system may take few mins to get the information. In the result page you will find an entry as "System Installation Date". That is the date of windows installation. This process works in XP ,Win7 and also on win8.

    0 讨论(0)
  • 2020-12-12 12:10

    Very simple way from PowerShell:

    (Get-CimInstance -Class Win32_OperatingSystem).InstallDate
    

    Extracted from: https://www.sysadmit.com/2019/10/windows-cuando-fue-instalado.html

    0 讨论(0)
  • 2020-12-12 12:12

    In Powershell run the command:

    systeminfo | Select-String "Install Date:"
    
    0 讨论(0)
  • 2020-12-12 12:14

    Windows 10 OS has yet another registry subkey, this one in the SYSTEM hive file:

    Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\
    

    The Install Date information here is the original computer OS install date/time. It also tells you when the update started, ie

     Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\Source OS (Updated on xxxxxx)."
    

    This may of course not be when the update ends, the user may choose to turn off instead of rebooting when prompted, etc...

    The update can actually complete on a different day, and

    Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\Source OS (Updated on xxxxxx)"
    

    will reflect the date/time it started the update.

    0 讨论(0)
提交回复
热议问题