Video Screencast Help

How to set Time zone and locale values during Windows 7 OSD

Created: 16 Apr 2013 | 8 comments


I am new to Altiris, now trying to deploy Windows 7 OS to a client computer using Altiris DS 7.1. I just want to know how to set the time zone and other locale settings for the client machine via task.

Please help..!!!



Operating Systems:

Comments 8 CommentsJump to latest comment

BBC's picture

There are surely multiple ways to accomplish such a task, so what I do is this. Attached is the .wsf file you also need for this, just rename it back from .txt to .wsf.

Copy the following files to the client into a single destination folder:

  • CustomSettings.ini
  • RegionalSettings.wsf
  • ZTIUtility.vbs

Then run this command line (of course you want to modify it not to set all to spanish !!):

cscript //nologo RegionalSettings.wsf /UserLocale:es-ES /SystemLocale:es-ES /KeyboardLocale:"0c0a:0000040a;0409:00000409" /UILanguage:es-ES /GeoID:217

CustomSettings.ini contents:

;For MDT 2008 add SystemLocale to properties
;Properties=SystemLocale, GeoID


RegionalSettings.wsf_.txt 13.94 KB
Vishnu_S's picture

Thank you BBC for the quick reply.. smiley

I am trying this now..



Gibson99's picture

i never could figure out how to make it work reliably in DS 7.1 even after i wrote a vbs along with custom token replacement in my unattend.xml.  we have locations all over the world, but we use the same image at every location.  basically my script is intended to run inside winpe.  it will look to see which package server it's running from, then based on that, set the proper time zone and regional settings directly in the unattend.xml, so that once the machine boots to production, it already has the correct settings. the hardest part of the script was finding a list of time zones to set in the unattend file, then making a big IF statement that picked the right TZ per server.  

as i said though, i never could get this to work consistently in 7.1.  we ended up going back to DS 6.9, where the script works perfectly every time.  

If a Connect post helped you out, be sure to click "Mark As Solution" or the "Thumbs Up" button to let other users know about it.

Thomas Baird's picture

why not set the time zone post-deployment?  In production?  Seems like, at that point, you'd have a bit more robust data.  OR, use a time synch server/service and just synch up your computers with their DC?

Just wondering.

Oh, and what made it fail in 7.1?  timing issues or something else?

Thomas Baird
Enthusiast for making things better!

Gibson99's picture

not sure.  it was well over a year ago now.  i think what was happening was that a given machine would boot to PE, lay down the image, then reboot to production even though the next step in the job (my vbs to modify and inject the unattend file) should have run in winpe too.  of course once a machine boots to production, it processes the unattend file right away, and if there isn't one, it asks for user input.  

so since it didn't get the settings i needed it to get, someone had to go physically reboot the machine as it would be sitting there at a regional settings screen, waiting for user input.  

If a Connect post helped you out, be sure to click "Mark As Solution" or the "Thumbs Up" button to let other users know about it.

Vishnu_S's picture

Shall i add this work as a task into my OSD job which will be execute right after my deploy OS task.?  Shall i use 'Copy File' task to copy these scripts to client machine and execute this. Is there any other methods/task for doing this.?



BBC's picture

This is actually used for post imaging. So once the machine comes up with the OS, you want to run the above. What I usually do is to place the files somewhere on the client so they only need to be ecexuted either from within the XML, your SetupComplete or whatever method you use and prefer.


Gibson99's picture

if it's done post-imaging, how do you detect where the computer is actually located so it can apply the correct settings?  during setupcomplete, the network is not up, so you can't use your IP/subnet to figure it out.  

the way i do it in winpe is a sort of oldschool cheat - i echo the pxe server name and redirect that to a file stored on the drive immediately after imaging.  i then refer to that file in a lot of different scripts afterwards to ensure that i'm always pulling files from the local package server rather than over the wan, during the machine build.  i decided to put it into a file so it would survive reboots.  otherwise a normal system variable would have been fine.  

If a Connect post helped you out, be sure to click "Mark As Solution" or the "Thumbs Up" button to let other users know about it.