Option Explicit
Dim Result
Dim oShell
Dim message
Set oShell = CreateObject("WScript.Shell")
message = "The_timezone_Is_Not_Set_To_Greenwich_Mean_Time and that is bad."
Result = ReadReg("HKLM\System\CurrentControlSet\Control\TimeZoneInformation\StandardName")
'WScript.echo Result
Function ReadReg(RegPath)
Dim objRegistry, Key
Set objRegistry = CreateObject("Wscript.shell")
Key = objRegistry.RegRead(RegPath)
ReadReg = Key
End Function
If Result <> "GMT Standard Time" Then
oShell.Run "cmd /c " & "opcmsg severity=critical application=TimeZone object=monitoring msg_text=The_Timezone_Is_Not_Set_To_Greenwich_Mean_Time."
End If
Comments
You can follow this conversation by subscribing to the comment feed for this post.