 |
|
 |
|
Next: Manually setting time...?
|
| Author |
Message |
External

Since: May 08, 2007 Posts: 93
|
(Msg. 1) Posted: Tue Mar 13, 2007 2:01 am
Post subject: Problem with Auto Adjust for Daylight Savings Archived from groups: microsoft>public>windowsxp>general (more info?)
|
|
|
Hello everyone,
I administer roughly 70 Windows XP Professional workstations on a network
that, when
initially installed, did not have the "Automatically adjust clock for
daylight saving changes" box checked in the Time Zone settings. I managed to
deploy the following registry setting to all affected computers
(HKLM\System\CurrentControlSet\Control\TimeZoneInformation\DisableAutoDaylightTimeSet=0).
However, the time does not actually adjust itself properly until I
physically log into the workstation, open the system date/time applet and
then click OK. Does anyone know of a way that this can be automated? Users
on this network do not have administrative rights, and I cannot imagine
having to log in to each machine individually to update the time. I've done
some exhaustive research but have come up with nothing. Hopefully it's
something I've accidentally overlooked. Does anyone know?
Much appreciated,
Adam |
|
| Back to top |
|
 |  |
External

Since: Mar 14, 2007 Posts: 1
|
(Msg. 2) Posted: Wed Mar 14, 2007 5:15 am
Post subject: Re: Problem with Auto Adjust for Daylight Savings [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Microsoft provided a VBscript to manually update machines fir the DST
patch. If you run a batch file that deletes or changes the reg key you
mentioned, then run the vbscript, it forces the machine to reload the
info. I can't find a link to the file, so here is the code...
************
Set objSh = CreateObject("WScript.Shell")
'Get the StandardName key of the current time zone
szStandardName = objSh.RegRead("HKLM\SYSTEM\CurrentControlSet\Control
\TimeZoneInformation\StandardName")
'Enumerate the subkeys in the time zone database
const HKEY_LOCAL_MACHINE = &H80000002
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.
\root\default:StdRegProv")
szTzsKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time
Zones"
objReg.EnumKey HKEY_LOCAL_MACHINE, szTzsKeyPath, arrTzSubKeys
'Step through the time zones to find the matching Standard Name
szTzKey = "<Unknown>"
For Each subkey In arrTzSubKeys
If (objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & subkey & "\Std")
= szStandardName) Then
'Found matching StandardName, now store this time zone key
name
szTzKey = subkey
End If
Next
If szTzKey = "<Unknown>" Then
'Write entry to the Application event log stating that the
update has failed to execute
objSh.LogEvent 1, "DST 2007 Registry Update and Refresh failed
to execute on this computer. Time zones failed to enumerate properly
or matching time zone not found."
Wscript.Quit 0
End If
'Launch control.exe to refresh time zone information using the TZ key
name obtained above
objSh.Run "control.exe timedate.cpl,,/Z" & szTzKey
'Get current display name of refreshed time zone
szCurrDispName = objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & szTzKey
& "\Display")
'Write entry to the Application event log stating that the update has
executed
objSh.LogEvent 4, "DST 2007 Registry Update and Refresh has been
executed on this computer." & chr(13) & chr(10) & chr(13) & chr(10) &
"Current time zone is: " & szCurrDispName & "."
******
create a .vbs file with that inside, and if you are like me you will
probably have to call it with the csript command from a login script.
The only part that is prob really needed is the
'Launch control.exe to refresh time zone information using the TZ key
name obtained above
objSh.Run "control.exe timedate.cpl,,/Z" & szTzKey
part.
Hope this works for you.
John Hottel
On Mar 13, 10:01 am, Adam <A....TakeThisOut@discussions.microsoft.com> wrote:
> Hello everyone,
>
> I administer roughly 70 Windows XP Professional workstations on a network
> that, when
> initially installed, did not have the "Automaticallyadjustclockfordaylightsaving changes" box checked in theTimeZone settings. I managed to
> deploy the following registry setting to all affected computers
> (HKLM\System\CurrentControlSet\Control\TimeZoneInformation\DisableAutoDaylightTimeSet=0).
> However, thetimedoes not actuallyadjustitself properly until I
> physically log into the workstation, open the system date/timeapplet and
> then click OK. Does anyone know of a way that this can be automated? Users
> on this network do not have administrative rights, and I cannot imagine
> having to log in to each machine individually to update thetime. I've done
> some exhaustive research but have come up with nothing. Hopefully it's
> something I've accidentally overlooked. Does anyone know?
>
> Much appreciated,
> Adam |
|
| Back to top |
|
 |  |
External

Since: May 08, 2007 Posts: 93
|
(Msg. 3) Posted: Wed Mar 14, 2007 9:22 am
Post subject: Re: Problem with Auto Adjust for Daylight Savings [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
That was it. Thanks!
"JFHottel@gmail.com" wrote:
> Microsoft provided a VBscript to manually update machines fir the DST
> patch. If you run a batch file that deletes or changes the reg key you
> mentioned, then run the vbscript, it forces the machine to reload the
> info. I can't find a link to the file, so here is the code...
>
> ************
> Set objSh = CreateObject("WScript.Shell")
>
> 'Get the StandardName key of the current time zone
> szStandardName = objSh.RegRead("HKLM\SYSTEM\CurrentControlSet\Control
> \TimeZoneInformation\StandardName")
>
> 'Enumerate the subkeys in the time zone database
> const HKEY_LOCAL_MACHINE = &H80000002
> Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.
> \root\default:StdRegProv")
> szTzsKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time
> Zones"
> objReg.EnumKey HKEY_LOCAL_MACHINE, szTzsKeyPath, arrTzSubKeys
>
> 'Step through the time zones to find the matching Standard Name
> szTzKey = "<Unknown>"
> For Each subkey In arrTzSubKeys
> If (objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & subkey & "\Std")
> = szStandardName) Then
> 'Found matching StandardName, now store this time zone key
> name
> szTzKey = subkey
> End If
> Next
>
> If szTzKey = "<Unknown>" Then
> 'Write entry to the Application event log stating that the
> update has failed to execute
> objSh.LogEvent 1, "DST 2007 Registry Update and Refresh failed
> to execute on this computer. Time zones failed to enumerate properly
> or matching time zone not found."
> Wscript.Quit 0
> End If
>
> 'Launch control.exe to refresh time zone information using the TZ key
> name obtained above
> objSh.Run "control.exe timedate.cpl,,/Z" & szTzKey
>
> 'Get current display name of refreshed time zone
> szCurrDispName = objSh.RegRead("HKLM\" & szTzsKeyPath & "\" & szTzKey
> & "\Display")
>
> 'Write entry to the Application event log stating that the update has
> executed
> objSh.LogEvent 4, "DST 2007 Registry Update and Refresh has been
> executed on this computer." & chr(13) & chr(10) & chr(13) & chr(10) &
> "Current time zone is: " & szCurrDispName & "."
>
> ******
>
> create a .vbs file with that inside, and if you are like me you will
> probably have to call it with the csript command from a login script.
> The only part that is prob really needed is the
> 'Launch control.exe to refresh time zone information using the TZ key
> name obtained above
> objSh.Run "control.exe timedate.cpl,,/Z" & szTzKey
> part.
>
> Hope this works for you.
>
>
>
> John Hottel
>
>
> On Mar 13, 10:01 am, Adam <A... DeleteThis @discussions.microsoft.com> wrote:
> > Hello everyone,
> >
> > I administer roughly 70 Windows XP Professional workstations on a network
> > that, when
> > initially installed, did not have the "Automaticallyadjustclockfordaylightsaving changes" box checked in theTimeZone settings. I managed to
> > deploy the following registry setting to all affected computers
> > (HKLM\System\CurrentControlSet\Control\TimeZoneInformation\DisableAutoDaylightTimeSet=0).
> > However, thetimedoes not actuallyadjustitself properly until I
> > physically log into the workstation, open the system date/timeapplet and
> > then click OK. Does anyone know of a way that this can be automated? Users
> > on this network do not have administrative rights, and I cannot imagine
> > having to log in to each machine individually to update thetime. I've done
> > some exhaustive research but have come up with nothing. Hopefully it's
> > something I've accidentally overlooked. Does anyone know?
> >
> > Much appreciated,
> > Adam
>
>
> |
|
| Back to top |
|
 |  |
| Related Topics: | Daylight Savings Time Problem - The automatic Daylight Savings Time clock adjustment feature also changes my file dates/times. How do I force..
Automatically adjust clock setting for daylights savings - We have XP pro running, all with the DST2007 patch. on some of the WS the "Automatically adjust clock setting for....
Daylight Savings - I have Windows 2003 AD, therefore, is there a way to update the AD and push it down to the clients? Do I have to..
Daylight Savings - Howdy ! How do I know if my XPSP2 automatic updates has download the appropriate update for the daylight savings..
Daylight Savings Question - Is running the scripts to edit the registry for the new DST changes described in KB914387 good enough for Windows XP..
no patch for daylight savings? - Windows didnt seem to know we went to daylight savings last night. It always updated itself correctly before. I would.... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|