
Curiosity always seems to get the better of me of wanting to achieve a better understanding of a particular subject or in this case learning how to get the installation date of Microsoft Windows. I figured this out on Linux, so why not continue this on with another operating system. There are of course many was to go about getting the installation or creation date and time of a Windows system. As mentioned in my previous post, which method you choose is up to you and remember depending on the solution you may get misleading data.
I played around with several solutions I found online using Windows 10 22H2. While doing my testing I discovered my installation will be 3 years old in August 2023. Shocking considering most of us know that Windows requires a fresh install just to keep it happy :-).
Windows Settings
- Click on the Windows “Start” button.
- Click on “Settings” > “System” > “About”.
-
In the “Settings” window under “Windows specifications”, look for the “Installed on” value.
Edition Windows 10 Pro Version 22H2 Installed on 8/13/2020 OS build 19045.2965 Experience Windows Feature Experience Pack 1000.19041.1000.0
For clarity the date is formatted as month, day, year.
Windows Folder
This solution is not always ideal due to the fact that a folder or directory date can be changed overtime.
- Click on the Windows “Start” button.
- Browse to “Windows System”.
- Click on “File Explorer”.
- Within the left-hand panel click on the “Local Disk (C:)”.
-
Right mouse click on the “Windows” folder and click on “Properties”.
Look for the “created” value within the folder properties dialog.
File System
As far as I know there is no built-in way to access the creation date of the file system or partition. However, the approximate date can be obtained by looking at the creation date of “System Volume Information” found on the C drive.
- Click on the Windows “Start” button.
- Browse to “Windows System”.
- Click on “File Explorer”.
- On the left-hand side click on “Local Disk (C:)”.
- Click on the “View” menu then “Options”.
-
Uncheck “Hide protected operating system files (Recommended)”.
This step is required in order to see the “System Volume Information” folder. It is advised to enable this feature again once the task has been completed.
- Click on the “OK” button.
-
Right mouse click on the “System Volume Information” folder and click on “Properties”.
Look for the “created” value within the folder properties dialog.
Windows PowerShell
- Click on the Windows “Start” button.
- Browse to “Windows PowerShell”.
- Click on “Windows PowerShell”.
-
Use one of the following command examples.
PS C:\> ([WMI]'').ConvertToDateTime((Get-WmiObject Win32_OperatingSystem).InstallDate)
Thursday, August 13, 2020 9:31:58 PM
$date = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' | select -ExpandProperty InstallDate (Get-Date "1970-01-01 00:00:00.000Z") + ([TimeSpan]::FromSeconds($date))
Thursday, August 13, 2020 9:31:58 PM
As I understand it there is supposed to be multiple registry entries of “Source OS (Updated on xxxxxx)” per update. However, as you can see I only have one entry even though I have all the recommended updates installed to date.
$AllBuilds = $(gci "HKLM:\System\Setup" | ? {$_.Name -match "\\Source\s"}) | % { $_ | Select @{n="UpdateTime";e={if ($_.Name -match "Updated\son\s(\d{1,2}\/\d{1,2}\/\d{4}\s\d{2}:\d{2}:\d{2})\)$") {[dateTime]::Parse($Matches[1],([Globalization.CultureInfo]::CreateSpecificCulture('en-US')))}}}, @{n="ReleaseID";e={$_.GetValue("ReleaseID")}},@{n="Branch";e={$_.GetValue("BuildBranch")}},@{n="Build";e={$_.GetValue("CurrentBuild")}},@{n="ProductName";e={$_.GetValue("ProductName")}},@{n="InstallTime";e={[datetime]::FromFileTime($_.GetValue("InstallTime"))}} }; $AllBuilds | Sort UpdateTime | ft UpdateTime, ReleaseID, Branch, Build, ProductName
UpdateTime ReleaseID Branch Build ProductName ---------- --------- ------ ----- ----------- 8/13/2020 7:54:54 PM 1909 19h1_release 18363 Windows 10 Pro
Windows Registry Editor
- Open the “Run” dialog by pressing the keys, Windows+R.
- Type in the input field without double quotes “regedit” and press Enter.
-
Browse to the following location.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
- On the right-hand side double click on “InstallDate”.
- Within “Edit DWORD” dialog click on “Decimal” under “Base”.
-
The “Value data” field value is the installation date.
The “Value data” field value is formatted in seconds since January 1st, 1970, better know as Unix time.
The seconds can be easily converted using Windows PowerShell.
PS C:\> (Get-Date -Date "1970-01-01 00:00:00Z").addSeconds(1597375918)
Thursday, August 13, 2020 9:31:58 PM
Windows Systeminfo
- Click on the Windows “Start” button.
- Browse to “Windows System”.
- Click on “Command Prompt”.
-
Input the following command after the prompt and press Enter.
C:\Users\Adam>systeminfo | find /i "install date"
Original Install Date: 8/13/2020, 9:31:58 PM
For clarity the date is formatted as month, day, year.
Windows Management Infrastructure Command-line
- Click on the Windows “Start” button.
- Browse to “Windows System”.
- Click on the “Command Prompt”.
-
Input the following command after the prompt and press Enter.
C:\Users\Adam>wmic os get installdate
InstallDate 20200813213158.000000-360
The output timestamp is formatted as “yyyyMMddHHmmss” and is described as shown below. The value after the period represents the number of milliseconds.
- yyyy = Numeric representation of a year, 4 digits
- MM = Numeric representation of a month, 2 digits with leading zero
- dd = Day of the month, 2 digits with leading zero
- HH = 24-hour format of an hour, 2 digits with leading zero
- mm = Minutes, 2 digits with leading zero
- ss = Seconds, 2 digits with leading zero
Info
WMIC utility is deprecated as of Windows 10 and Windows Server version 21H1. This utility is superseded by Windows PowerShell for WMI.
References
- Command-line interface, Wikipedia
- Determine when Windows was installed on a computer, Super User
- Find out Windows Installation Date using various methods, TheWindowsClub
- How do I find the install time and date of Windows?, Stack Overflow
- How to Find Windows Installation Date and Time, Winhelponline
- How to tell when Windows was installed on a computer, Computer Hope
- Microsoft Windows, Wikipedia
- PowerShell, Wikipedia
- Unix time, Wikipedia
- Windows Management Instrumentation, Wikipedia
- Windows Registry, Wikipedia
- WMIC: WMI command-line utility, Microsoft Learn
Changelog
-
- Fix tag case