Time Zone update methods since August, 2009

Questions about Update Pack making? Ask here.
Post Reply
User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Time Zone update methods since August, 2009

Post by 5eraph » Tue Dec 01, 2009 10:25 pm

It may have become apparent to many update pack makers that Microsoft has made time zone updating more difficult since the release of August's cumulative update (KB970653-v3) by using TZChange.dll instead of the familiar TZChange.exe commands we've seen previously. While beyond my level of expertise, it seems that recreating these commands and using them alongside the registry entries in [Product.Add.Reg] in update.inf is now standard procedure for most.

At first, for v2009-10_1 of my own update pack, I tried simply using the entries in [Product.Add.Reg] at both T~20 and T-13, hoping it wouldn't be necessary to recreate the missing commands. This didn't work because the "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" key was populated before then, using the old data, with no obvious way of refreshing the information afterward. One symptom, as reported to me by Kurt_Aust, was that the DST offset for "(GMT+10:00) Canberra, Melbourne, Sydney" was not applied when it should be. The end-user could fix this by changing away from, then back to the desired time zone.

I fixed this by adding the new time zone entries from [Product.Add.Reg] during textmode using the [HiveInfs.Fresh] section of TxtSetup.sif, in addition to adding them at T-13. This worked, but, upon further investigation, the "(GMT+08:00) Perth" zone wasn't updated compared to a machine upon which the original KB974176 update package was installed. The following image is what the selection window should look like, but the area selected by the red oval still showed the DST adjustment checkbox, which was incorrect.
  • Image
I used user_hidden's 1.1.1 update pack on my x86 machine here and it shows the same incorrect checkbox before updating to the latest cumulative time zone update. I must assume that all other update packs using the same method with commands and [Product.Add.Reg]-based update methods produce the same result. Something is wrong with this method.

When looking into this further, I've found that the following line in [Product.Add.Reg] is incorrect compared what's found in the Windows registry after using the update package. This line is altered for readability here:

Code: Select all

HKLM,"%TZROOT%\W. Australia Standard Time","TZI",0x1,20,FE,FF,FF,00,00,00,\
00,C4,FF,FF,FF,00,00,03,00,00,00,05,00,03,00,00,00,00,00,00,00,00,00,0A,\
00,00,00,05,00,02,00,00,00,00,00,00,00
It should be this:

Code: Select all

HKLM,"%TZROOT%\W. Australia Standard Time","TZI",0x1,20,FE,FF,FF,00,00,00,\
00,C4,FF,FF,FF,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00
There may be other lines that are incorrect compared to what ends up in the registry, but I don't want to ruin my eyes looking for them all. [Product.Add.Reg] contains bad information and should not be used.

The easiest way I can think of to get the correct information is to export the entire "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones" key and add it as a hive during textmode setup. This method has the following advantages:
  • Most importantly, the correct registry entries are added.
  • The entries are added as early as possible, before the "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" key is populated later in GUImode setup.
  • No bulky TZChange.exe commands need to be reverse-engineered or used at all.
Have I missed anything? Please, let me know what you think.
Last edited by 5eraph on Fri Dec 11, 2009 8:37 am, edited 2 times in total.

User avatar
RyanVM
Site Admin
Posts: 5186
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Tue Dec 01, 2009 10:43 pm

I used to manually add all the registry entries prior to using TZChange, but I found that it wasn't reliable, even when using hives. Lest we forget days of people's computers thinking they were in Turkey :)
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Tue Dec 01, 2009 10:53 pm

The [Product.Add.Reg] section may have been faulty then, as well. Importing a properly updated key should solve this problem. :)

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Wed Dec 02, 2009 1:27 am

Yep I have noticed this, the .INF does not match the changes in the registry, it uses tzchange.dll to dynamically update the registry

I still prefer to use tzchange.exe, its so much better...to verify after a fresh install with my updatepack I manually lower the tzversion/kblast and reinstall hotfix to see if any changes were made

BTW I too have tried adding the new entries & tz indexes to the hive*.inf so that I could use the new index numbers in winnt.sif, but this failed...also the order of the timezones when xp installed in non unattended mode were out of whack

OH before I forget you guys may want to have a look at KB972423, the strings for this hotfix are present in KB977748. Here is how I add it:

Code: Select all

"%11%\tzchange.exe /A ""Bangladesh Standard Time"" /S 6 5 3 23 0 0 0 /E 12 4 5 23 0 0 0 /D -60 /R 0 /B -360 /T ""%Bangladesh_Std%"" /L ""%Bangladesh_Dlt%"" /N ""%Bangladesh_Display%"" /G /I 2147483731"     ; KB972423
"%11%\tzchange.exe /F ""Central Asia Standard Time"" /N ""%CentralAsia_Display%"" /G"     ; Fix it
I think there will soon be another hotfix like this, I notice the one with index number 2147483732 is skipped/missing (maybe has something to do whith the Samoa and Midway unused Strings)
Last edited by ricktendo64 on Wed Dec 02, 2009 1:39 am, edited 2 times in total.

User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Wed Dec 02, 2009 1:36 am

It's possible that you are using better commands than user_hidden, but I have no way of testing your update pack to be certain since I use ENU. Recreating the commands seems like a lot of extra work to me. You have more patience than I.

Yeah, I couldn't use the new indexes in WinNT.sif either. It made sense to me at the time. It seems that the index values are hard-coded during setup. New, unrecognized values cause Windows to prompt the user to choose among the old set of time zones, even when the new ones should be available from the start.

Time zone order doesn't seem to be an issue for me, attended install or not.

User avatar
user_hidden
Posts: 1924
Joined: Thu Dec 06, 2007 7:52 am
Location: Canada eh!

Post by user_hidden » Wed Dec 02, 2009 7:14 am

5eraph wrote:It's possible that you are using better commands than user_hidden, but I have no way of testing your update pack to be certain since I use ENU. Recreating the commands seems like a lot of extra work to me. You have more patience than I..
my [T13.UpdateTimeZones.AddReg] section is taken fron the registry and not the update.inf, are you saying there is an error?

User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Wed Dec 02, 2009 8:12 am

There was an inconsistency with v1.1.1. I haven't tried a newer version, but it seems to be corrected with the command line in v1.1.4 if I'm reading it right.

Apparently, there are differences between the KB974176 packages for XPx86 and XPx64. The package for XPx64 actually removes DST for Perth in 2009, as described in the article, where the XPx86 package does not.

I'm sorry for the confusion. I blame Microsoft. ;)
  • Image

User avatar
user_hidden
Posts: 1924
Joined: Thu Dec 06, 2007 7:52 am
Location: Canada eh!

Post by user_hidden » Wed Dec 02, 2009 11:41 am

5eraph wrote:I'm sorry for the confusion. I blame Microsoft. ;)

:lol:

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Wed Dec 02, 2009 12:05 pm

5eraph wrote:Apparently, there are differences between the KB974176 packages for XPx86 and XPx64. The package for XPx64 actually removes DST for Perth in 2009, as described in the article, where the XPx86 package does not.

I'm sorry for the confusion. I blame Microsoft. ;)
  • Image
This is not the case with spanish hotfix, it does remove the dst

Image

User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Thu Dec 15, 2011 12:36 pm

As mentioned by user_hidden, here's the script I'm currently using to create the text-mode registry hive file. Basic directions are in the CMD file.

Download:Changelog:
  • [2011/12/22 22:00 UTC] - 2011-12_3 - Can now sort entries alphabetically; read CMD notes for more details. Added a couple tweaks "under the hood" for when this script is called from another script.

    [2011/12/16 20:25 UTC] - 2011-12_2 - Now detects values and keys removed by an update package, even though no update package does this yet. These entries will appear in a [DelReg] section at the beginning of the output file when present.

    [2011/12/15 17:35 UTC] - 2011-12_1 - Initial release.
Last edited by 5eraph on Thu Dec 22, 2011 4:58 pm, edited 7 times in total.

User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Fri Dec 16, 2011 3:27 pm

TZScript updated.

SHO_GuN
Posts: 142
Joined: Fri Jun 30, 2006 11:26 pm

Post by SHO_GuN » Sat Dec 17, 2011 3:48 pm

Thanks - works great :)

User avatar
5eraph
Site Admin
Posts: 4608
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Thu Dec 22, 2011 4:42 pm

You're welcome. :)

TZScript updated again. It's good enough for me, so this'll be the last I look at it for a while.

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Thu Dec 22, 2011 6:02 pm

Thanks 5

Post Reply