Jump to content


lord_hydrax

OSDTimezone variable issue

Recommended Posts

Hey Guys,

 

Might be a stretch but wondering if anyone here had any ideas.... I have a frontend hta built configured in the OSD Task Sequence which as part of it sets the variable OSDTimezone.

 

I basically have a dropdown box with a list of locations available to set the timezone.

 

My problem is that timezone names that have full stops don't set correctly and when the computer loads it has GMT time and not what was selected.

 

I am using the microsoft list: http://technet.microsoft.com/en-us/library/cc772783%28WS.10%29.aspx

 

An example is that if "New Zealand Standard Time" is selected it works fine however "A.U.S. Eastern Standard Time" does not.

 

Here is an example of the vbscript section of the code:

 

	If sTSLocation = "Auck" Then
	oTaskSequence("OSDTimeZone") = "New Zealand Standard Time"
	window.Close() 
End If

If sTSLocation = "Suns" Then
	oTaskSequence("OSDTimeZone") = "A.U.S. Eastern Standard Time"
	window.Close() 
End If

 

I have had this working before but I'll be damned if I can remember now. :)

 

I even put a msgbox in to ensure that it is picking up the rule correctly:

 

	If sTSLocation = "Dand" Then
	oTaskSequence("OSDTimeZone") = "A.U.S. Eastern Standard Time"
	msgbox "Dandenong Selected"
window.Close() 
End If

 

The msgbox displays however once the computer loads it is set to GMT time.

 

I also tried using the index number but that does not seem to work at all.

 

Any ideas?

 

Is there some way I can check what the variable is set to during the build process as that might give me some clue as to what is going on?

Share this post


Link to post
Share on other sites


Since nobody has chimed in, I thought I'd ask... Have you tried using the numbers for the time zones instead of the names? So you'd use "255" instead of "A.U.S. Eastern Standard Time". I don't have to mess with time zones, so just tossing it out there...

Share this post


Link to post
Share on other sites

Thanks for the reply Lucid.

 

The index numbers I referred to in my post are the numbers you mentioned there.

 

I haven't come up with any other ideas at this point.

Share this post


Link to post
Share on other sites

Sorry about that, I must have missed that line in your original post. So what's the VBScript code you're using when you use the numbers?

Share this post


Link to post
Share on other sites

What I've essentially done is tried replacing "A.U.S. Central Standard Time" with "255" for the string.

 

I've had no success myself using the index numbers, not sure if they are meant to work at all.

Share this post


Link to post
Share on other sites

Just curious, but... Have you tried using the numbers without the quotation marks? So 255 instead of "255"...

Share this post


Link to post
Share on other sites

I actually pulled off the error today from an SCCM report:

 

Time Zone: A.U.S. Eastern Standard Time Searching time zone 'A.U.S. Eastern Standard Time' to find index. Setting product key. Setting local admin password. 
Licensing Mode: Per Seat Exiting with return code 0x00000000 Failed to find index value for timezone 'A.U.S. Eastern Standard Time'. Defaulting to GMT Standard Time 

 

Then I select one of our North American locations and its fine:

 

Time Zone: Central Standard Time Searching time zone 'Central Standard Time' to find index. Index value for 'Central Standard Time' timezone is 20 Setting product key. Setting local admin password. Licensing Mode: Per Seat Exiting with return code 0x00000000 

 

Same format of code for both...

Share this post


Link to post
Share on other sites

....And fixed it.

 

Despite Microsoft's format on their website being "A.U.S. Eastern Standard Time" I changed it to "AUS Eastern Standard Time" and now it is setting the timezone correctly.

 

I was thinking it might have had something to do with those full stops!

Share this post


Link to post
Share on other sites

well done, nice find

Share this post


Link to post
Share on other sites

....And fixed it.

 

Despite Microsoft's format on their website being "A.U.S. Eastern Standard Time" I changed it to "AUS Eastern Standard Time" and now it is setting the timezone correctly.

 

I was thinking it might have had something to do with those full stops!

 

Hey mate.. I know you have moved on fronm this issue but for everyone's information, the timezone codes lord_hyrax got is from the old article. At some stage between XP and Vista (also server 2k3 to 2k8), the timezone codes were renamed so you need to specify the OS you want to target. You also need to be be very careful when reading articles about timezones because they change very often due to some states implementing/extending DST and so on. Not sure if you can refer to the timezone via the code when using the OSDTimeZone variable but you can defintely use TZ Codes using sysprep.

 

http://technet.microsoft.com/en-us/library/cc749073(v=ws.10).aspx

 

 

Regards,

 

tupham

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...