strComputer = "."
Set objWMIService = GetObject ( _
"winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery( _
"Select * from Win32_LocalTime")
For Each objItem in colItems
wscript.Echo "Day: " & objItem.Day & VBNewLine _
& "Hour: " & objItem.Hour & VBNewLine _
& "Minute: " & objItem.Minute & VBNewLine _
& "Year: " & objItem.Year
Next
Comments
You can follow this conversation by subscribing to the comment feed for this post.