Sunday, December 20, 2009

Know Your Operating System Install Date

Know Your Operating System Install Date

Here is a simple script that will tell you your OS install date & Time
Open Notepad. Just copy and paste the below mentioned codes into that notepad file and save it with .vbs extension ( eg. OSINSTALLDATE.vbs ).

Double click that file & it will show your OS install date & time. Have Fun.

Code:
' © 2006 Abdul Aleem
'Returns the Operating System installation date.
strComputer = "."
Set dtmInstallDate = CreateObject( _
"WbemScripting.SWbemDateTime")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
MsgBox "Install Date: " & getmydat (objOperatingSystem.InstallDate)
Next
Function getmydat(wmitime)MsgBox = "This trick is gived by Abdul Aleem"
dtmInstallDate.Value = wmitime
getmydat = dtmInstallDate.GetVarDate
End function


Source : I've found this code a long time back. So I could not remeber where.
But I'm mentioning it in here with the copyright information intact .
Don't remove that copyright information if you would like and use this code.

Other method :

Also you can also know your OS install date with this command. Just type it in
a command prompt window and press enter. Only for newbies. geeks stay apart

systeminfo

No comments: