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?
Will you find a vb script that anyone can execute on his/her computer, with the expected result ?
Dim dtm Install Date As Date Time Dim o Searcher As New Management Object Searcher("SELECT * FROM Win32_Operating System") For Each o Mgmt Obj As Management Object In o Searcher.
Get dtm Install Date = Management Date Time Converter.
To Date Time(CStr(o Mgmt O bj("Install Date"))) Next ; Windows Install Date ; $readreg = Reg Read("HKLM\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\", "Install Date") $s New Date = _Date Add( 's',$readreg, "1970/01/01 ") Msg Box( 4096, "", "Date: " & $s New Date ) Exit Function Get Install Date: String; Var di: longint; buf: Array [ 0..3 ] Of byte; Begin Result := 'Unknown'; With TRegistry.
Create Do Begin Root Key := HKEY_LOCAL_MACHINE; Lazy Write := True; Open Key ( '\SOFTWARE\Microsoft\Windows NT\Current Version', False ); di := readbinarydata ( 'Install Date', buf, sizeof ( buf ) ); // Result := Date Time To Str ( File Date To Date Time ( buf [ 0 ] + buf [ 1 ] * 256 + buf [ 2 ] * 65535 + buf [ 3 ] * 16777216 ) ); show Message(inttostr(di)); Free; End; End; to only filter the "Original Install Date".
If you use "install" as string you will get more information than you need.
Also, if the locale is not English then this will probably not work. For Swedish this would be "ursprungligt" and "ursprüngliches" for German.
Open command prompt, type "systeminfo" and press enter.
Your system may take few mins to get the information. Ever wanted to find out your PC’s operating system installation date?