Jump to content


  • 0
lord_hydrax

OSDTimezone variable issue

Question

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

Recommended Posts

  • 0

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

  • 0

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

  • 0

....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

Join the conversation

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

Guest
Answer this question...

×   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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.