OS Install Date

  • Thread starter Thread starter JP
  • Start date Start date
J

JP

Is there somewhere in Windows files or in the Registry where one can find
when the operating system was installed on a computer?

Windows XP Home/Professional, the latter for both 32bit and 64bit editions
are in mind.

Regards and thanks.

JP
---
 
Is there somewhere in Windows files or in the Registry where one can find
when the operating system was installed on a computer?

Windows XP Home/Professional, the latter for both 32bit and 64bit editions
are in mind.

Regards and thanks.

JP

Open XP's "Help and Support" and click on "Use Tools to view your computer information and
diagnose problems", Click on "My Computer Information", Click on "View the status of my system
hardware and software", and look under "System Software - Date Created"

From a command prompt: (Start -> Run -> command -> OK) type:

SystemInfo >C:\Info.txt

Then double-click "Info.txt" to read it with Notepad.
 
The following VB Script will do it. Copy and paste the following into a Notepad file and save it with a VBS extension.

'Script to retrive OS Installation date and time
Option Explicit
On Error Resume Next

Dim obj, objStdOut

Set objStdOut = WScript.StdOut

' OS Install Date

For Each obj in GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery(_
"Select CurrentTimeZone, InstallDate From Win32_OperatingSystem")
With CreateObject("WbemScripting.SWbemDateTime")
.Value = obj.InstallDate
msgbox DateAdd("n", -obj.CurrentTimeZone, .GetVarDate)
End With
Next
WScript.Quit
 
Thanks for the response. I saved the text pasted in Notepad as a VBS file as
instructed and it worked perfectly!

Regards and thanks again.

JP
----

The following VB Script will do it. Copy and paste the following into a
Notepad file and save it with a VBS extension.

'Script to retrive OS Installation date and time
Option Explicit
On Error Resume Next

Dim obj, objStdOut

Set objStdOut = WScript.StdOut

' OS Install Date

For Each obj in
GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery(_
"Select CurrentTimeZone, InstallDate From Win32_OperatingSystem")
With CreateObject("WbemScripting.SWbemDateTime")
.Value = obj.InstallDate
msgbox DateAdd("n", -obj.CurrentTimeZone, .GetVarDate)
End With
Next
WScript.Quit
 
Thanks for the response with the very clear instructions. Worked perfectly!

Regards and thanks again.

JP
---
 
You're welcome, JP. With a bit of searching on Google, you can probably find the WMI references that will let modify the script to allow you to poll all the machines on your network. You might also want to check into the general VB Script documentation. This could allow you to poll all the machines and create a log file with the computer name, install date, and any other information that you might want from what WMI can obtain.
 
Back
Top