VbsEdit, the award-winning VBScript editor that dramatically reduces the time you spend writing .VBS scripts

Sample scripts


Operating System
   Dates and Times
       Set the Time Zone Offset from Greenwich Mean Time , WMI

' Set the Time Zone Offset from Greenwich Mean Time



On Error Resume Next

strComputer = "."
'Change value to reflect desired GMT offset in minutes.
intGMTOffset = -480

Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colCompSys = objWMIService.ExecQuery _
 ("Select * from Win32_ComputerSystem")

For Each objCompSys in colCompSys
  objCompSys.CurrentTimeZone = intGMTOffset
  objCompSys.Put_
  If Err = 0 Then
    Wscript.Echo "Time zone set to specified value."
  Else
    Wscript.Echo "Unable to set time zone."
  End If
  Err.Clear
Next



VbsEdit includes all these samples!



Download now! (32-bit version)
version 4.0   -   The evaluation version never expires

Download 64-bit version



Home   Buy Now   HtaEdit   Support   Video   What's new ?   Awards

Copyright (C) 2001-2010 Adersoft