Roland
Wed Dec 03 17:11:51 CST 2003
"Steve" <stephen.d.powers@wellsfargo.com> wrote in message
news:00c901c3b9d2$fa3b5910$a501280a@phx.gbl...
> Yeah, and you'd think there would be a way to change it if
> you can view it, but I'm not sure how to do that. There's
> got to be like a SetTimeZone function or something.
'Set TimeZone to GMT(-5)
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "System\ControlSet001\Control\TimeZoneInformation"
strEntryName = "ActiveTimeBias"
dwValue = 300
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, dwValue
strEntryName = "Bias"
dwValue = 300
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, dwValue
strEntryName = "DaylightName"
strValue = "Eastern Daylight Time"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, strValue
strEntryName = "StandardName"
strValue = "Eastern Standard Time"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, strValue
set objReg = nothing
'Set TimeZone to GMT(-6)
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "System\ControlSet001\Control\TimeZoneInformation"
strEntryName = "ActiveTimeBias"
dwValue = 360
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, dwValue
strEntryName = "Bias"
dwValue = 360
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, dwValue
strEntryName = "DaylightName"
strValue = "Central Daylight Time"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, strValue
strEntryName = "StandardName"
strValue = "Central Standard Time"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, strValue
set objReg = nothing
-------------------
You may have to set more options depending on what you're setting, i.e.
Daylight Savings is not everywhere.
Source:
http://www.microsoft.com/technet/scriptcenter/scrguide/sas_reg_utys.asp
--
Roland
This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.