Free Advertising

Friday, February 22, 2008

Know Your Operating System Install Date

' © 2006 Shailendra
'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)
dtmInstallDate.Value = wmitime
getmydat = dtmInstallDate.GetVarDate
End function

Here is a simple script(code in red color) 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.



1 comments:

Fox said...

Sorry. Look please here

Free ads