How to find the time and date of installation of Windows?

This may seem like a bit of a crazy question, but how can I find out (hopefully using the API key / registry) the time and date of installing Windows?

The best I can think of is to look at various files in C: \ Windows and try to guess ... but this is not a good solution.

+123
windows install
04 Oct '08 at 16:36
source share
16 answers
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate 

It is set as the number of seconds since January 1, 1970.

To convert this number to a readable date / time, simply paste the decimal value into the “UNIX TimeStamp:” field of this online Unix Time Conversion tool .

+83
04 Oct '08 at 16:43
source share

Another question: “Vulnerability for code-challenge ”: here are some source codes for the source code to answer the problem, but they are not complete.
Do you find a vb script that anyone can execute on their computer with the expected result?




 systeminfo|find /i "original" 

will give you the actual date ... not the number of seconds;)
Since Sammy comments , find /i "install" gives more than you need.
And this only works if the language is English: it must match the language.
For Swedish, this will be ursprungligt and ursprüngliches for German.




In a Windows PowerShell script, you can simply type:

 PS > $os = get-wmiobject win32_operatingsystem PS > $os.ConvertToDateTime($os.InstallDate) -f "MM/dd/yyyy" 

Using WMI ( Windows Management Tool )

If you are not using WMI, you should read then convert the registry value:

 PS > $path = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' PS > $id = get-itemproperty -path $path -name InstallDate PS > $d = get-date -year 1970 -month 1 -day 1 -hour 0 -minute 0 -second 0 ## add to hours (GMT offset) ## to get the timezone offset programatically: ## get-date -f zz PS > ($d.AddSeconds($id.InstallDate)).ToLocalTime().AddHours((get-date -f zz)) -f "MM/dd/yyyy" 

The rest of this post gives you other ways to access the same information. Choose your poison;)




In VB.Net, this will give something like:

 Dim dtmInstallDate As DateTime Dim oSearcher As New ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem") For Each oMgmtObj As ManagementObject In oSearcher.Get dtmInstallDate = ManagementDateTimeConverter.ToDateTime(CStr(oMgmtO bj("InstallDate"))) Next 



In Autoit (a Windows scripting language) that will look like this:

 ;Windows Install Date ; $readreg = RegRead("HKLM\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\", "InstallDate") $sNewDate = _DateAdd( 's',$readreg, "1970/01/01 00:00:00") MsgBox( 4096, "", "Date: " & $sNewDate ) Exit 



In Delphy 7, it will look like:

 Function GetInstallDate: String; Var di: longint; buf: Array [ 0..3 ] Of byte; Begin Result := 'Unknown'; With TRegistry.Create Do Begin RootKey := HKEY_LOCAL_MACHINE; LazyWrite := True; OpenKey ( '\SOFTWARE\Microsoft\Windows NT\CurrentVersion', False ); di := readbinarydata ( 'InstallDate', buf, sizeof ( buf ) ); // Result := DateTimeToStr ( FileDateToDateTime ( buf [ 0 ] + buf [ 1 ] * 256 + buf [ 2 ] * 65535 + buf [ 3 ] * 16777216 ) ); showMessage(inttostr(di)); Free; End; End; 
+162
04 Oct '08 at 16:46
source share

We have enough answers here, but I want to put my 5 cents.

I have Windows 10 installed on 10/30/2015 and Creators Update installed on 04/14/2017 on top of my previous installation. All the methods described in the previous answers give me the date the Creators Update was installed.

Original Install Date

I managed to find the creation date of several files that corresponds to the real (clean) installation date of my Windows 10:

  • in C:\Windows

Few C: \ Windows files

  • in C:\

Few c: \ files

+41
Jun 14 '17 at 8:31 on
source share

Open a command prompt, type " systeminfo " and press enter. Your system may take several minutes to get information. On the results page, you will find the entry as “System Installation Date”. This is the date you installed Windows. This process works in XP, Win7, and also on win8.

+35
Nov 23 '12 at 18:28
source share

How to find out the date and time of installation of Windows 7:

just watch it ...

  • start> enter CMD
  • enter systeminfo

what he; then you can see all the information about your car; very simple method

+17
Apr 28 '11 at 12:14
source share

Ever wanted to know the installation date of your PC's operating system? Below is a quick and easy way to find out the date and time of installation of the operating system (or the latest version).

Open a command prompt (start-> run -> type cmd-> hit enter) and run the following command

systeminfo | find / i "set date"

In a couple of seconds you will see the installation date

+12
Jan 09 '14 at 1:55
source share

In Powershell, run the command:

 systeminfo | Select-String "Install Date:" 
+9
Jul 10 '14 at 21:13
source share

HKLM \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ InstallDate and systeminfo.exe give the wrong date .

The UNIX timestamp definition is independent of the time zone. The UNIX timestamp is defined as the number of seconds elapsed from 00:00:00 UTC, Thursday, January 1, 1970, excluding leap seconds.

In other words, if you installed your computer in Seattle, Washington, and moved to New York, NY, HKLM \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ InstallDate will not reflect this. This is an incorrect date ; it does not store the time zone where the computer was originally installed.

As a result, if you change the time zone while this program is running, the date will be incorrect. You must re-run the executable so that it takes into account the time zone change.

But you can get time zone information from the WMI Win32_Registry class.

InstallDate has the UTC format (yyyymmddHHMMSS .xxxxxx ± UUU) according to Microsoft TechNet's article “Working with Dates and Times Using WMI”, where, in particular, xxxxxx is milliseconds and ± UUU is the number of minutes other than Greenwich Mean Time .

  private static string RegistryInstallDate() { DateTime InstallDate = new DateTime(1970, 1, 1, 0, 0, 0); //NOT a unix timestamp 99% of online solutions incorrect identify this as!!!! ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Registry"); foreach (ManagementObject wmi_Windows in searcher.Get()) { try { ///CultureInfo ci = CultureInfo.InvariantCulture; string installdate = wmi_Windows["InstallDate"].ToString(); //InstallDate is in the UTC format (yyyymmddHHMMSS.xxxxxx±UUU) where critically // // xxxxxx is milliseconds and // ±UUU is number of minutes different from Greenwich Mean Time. if (installdate.Length==25) { string yyyymmddHHMMSS = installdate.Split('.')[0]; string xxxxxxsUUU = installdate.Split('.')[1]; //±=s for sign int year = int.Parse(yyyymmddHHMMSS.Substring(0, 4)); int month = int.Parse(yyyymmddHHMMSS.Substring(4, 2)); int date = int.Parse(yyyymmddHHMMSS.Substring(4 + 2, 2)); int hour = int.Parse(yyyymmddHHMMSS.Substring(4 + 2 + 2, 2)); int mins = int.Parse(yyyymmddHHMMSS.Substring(4 + 2 + 2 + 2, 2)); int secs = int.Parse(yyyymmddHHMMSS.Substring(4 + 2 + 2 + 2 + 2, 2)); int msecs = int.Parse(xxxxxxsUUU.Substring(0, 6)); double UTCoffsetinMins = double.Parse(xxxxxxsUUU.Substring(6, 4)); TimeSpan UTCoffset = TimeSpan.FromMinutes(UTCoffsetinMins); InstallDate = new DateTime(year, month, date, hour, mins, secs, msecs) + UTCoffset; } break; } catch (Exception) { InstallDate = DateTime.Now; } } return String.Format("{0:ddd d-MMM-yyyy h:mm:ss tt}", InstallDate); } 
+4
Apr 7 '17 at 17:48 on
source share

Windows 10 has another registry key that is located in the SYSTEM hive file:

 > "\Setup\Source OS." 

Information about the installation date - the initial date / time of installation of the computer operating system. It also tells you when the update started, i.e.

  "\Setup\Source OS (Updated on xxxxxx)." 

Of course, this may not be the case when the update ends, the user may refuse to reboot when prompted, etc.

The update may indeed complete another day and

 > "\Setup\Source OS (Updated on xxxxxx)" 

will display the date / time the update started.

+3
Nov 16 '17 at 18:12
source share

I believe the creation date of c: \ pagefile.sys can be pretty reliable in most cases. It is easy to get it with this command (assuming that Windows is installed on C :):

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

"/ As" indicates "system files", otherwise it will not be found. "/ T: c" sets the time field to display "creation".

+3
Jun 06 '18 at 16:47
source share

Determine Windows Installation Date Using WMIC

wmic os get installldate

+2
Aug 10 '18 at 0:55
source share

Use speccy. It shows the installation date in the "Operating System" section. http://www.piriform.com/speccy

+1
Apr 23 2018-11-21T00:
source share

You can also check the scan of any folder on the system drive, for example, “windows” and “program files”. Right-click the folder, click on the properties and check the folder creation date under the common tab.

+1
Aug 23 '11 at 18:16
source share

In RunCommand, type "MSINFO32" and press Enter. It will show all information related to the system.

+1
Nov 14 '14 at 13:40
source share

Press WindowsKey + R and type cmd

At the command prompt, type:

 systeminfo | find /i "Original" 

(for older versions of Windows, enter “ORIGINAL” in capital letters).

0
Jan 17 '18 at 2:58
source share

https://www.howtogeek.com/174997/ask-htg-how-can-i-check-the-age-of-my-windows-installation/ Here is the exact solution to your question. It shows the installation date of the original Windows, not the update with exact seconds.

-one
Apr 15 '19 at 20:32
source share