Location settings on image

Microsoft Windows xp professional w/serv...
February 16, 2010 at 04:39:57
Specs: Windows XP
My company is spread over many countries and timezones. Currently, a script runs at the end of the imaging build process to configure settings based on the user input of site number.

I am wanting to add to the script to auto-configure the timezone, regional and language settings dependant on the input.

Whats the best way to do this? I was thinking about exporting each sites registry keys and having the script just run these. I've had a problem with the time setting though.

Please help.

See More: Location settings on image

Report •

February 16, 2010 at 11:36:42
What you can do, is take a backup of the COMPLETE registry, then change only the one thing you look for (ie the time setting), and immediately take a full backup again. Then text-compare these files ..

Report •

February 16, 2010 at 13:52:34
this gets it on my XP and ME systems:
REG query HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation >> timezone.bat
goto :eof

Bias REG_DWORD 0x12c
StandardName REG_SZ Eastern Standard Time
StandardBias REG_DWORD 0x0
StandardStart REG_BINARY 00000A00050002000000000000000000
DaylightName REG_SZ Eastern Standard Time
DaylightBias REG_DWORD 0xffffffc4
DaylightStart REG_BINARY 00000400010002000000000000000000
ActiveTimeBias REG_DWORD 0x12c

The last line's value: 0x12c is the number of minutes to add to greenwich time to get local time. I used it to adjust my local clock to USNO atomic in foll script:
@echo off & setlocal
:: set computer clock to USNO atomic time
:: works best with wget.exe, nc.exe (netcat) or equivalent, can work using browser
:: if modified accordingly
del timer.pl
for /f "tokens=3" %%a in ('REG query HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation ^| find /i "activetimebias"') do set xx=%%a
set /a xx/=60
echo local hours diff from UTC (greenwich): %xx%
date /t >> timeset.log
wget http://tycho.usno.navy.mil/cgi-bin/...
for /f "tokens=3-5 delims=: " %%a in ('find /i "universal time"^<timer.pl') do (
set hour=%%a
set min=%%b
set sec=%%c
if %hour:~0,1% equ 0 set hour=%hour:~1%
set /a hour+=xx
if /i "%1" equ "set" (
echo %hour%:%min%:%sec% | time >> timeset.log
) else (
time /t | time >> timeset.log
>> timeset.log echo %1 USNO atomic clock: %hour%:%min%:%sec%
>> timeset.log echo ----------------------

If you don't find it in this part of registry, use TVC's suggestion and search the registry for certain strings and you can prob'ly find it. ("timezone", "daylight", etc.)

Report •

February 17, 2010 at 11:51:17
Thanks for the feedback.

I have managed to get it working for the format. I also found the keyboard setting, HKEY_USERS\.DEFAULT\Keyboard Layout\Preload\1 and it applies when it reboots but it resets to defaults when I login again.. any ideas?

I got the time setting to change to the correct time zone, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation, however the time doesn't update to reflect the time difference. eg. UTC to UTC+10 changes the timezone but doesn't add +10 to the clock.

I also need to change the location..

Any help is much appreciated!

Report •

Related Solutions

February 18, 2010 at 01:59:04
lol silly mistake on my part. OK I have keyboard and formats working.

Just need to find out where Location settings (Regional Options tab > Location) registry key is?

Report •

February 18, 2010 at 05:10:46
OK I've got the time working by using:
Control.exe TIMEDATE.CPL,,/Z Pacific Standard Time

Now I just need the Location setting but can't find where it is.. and its difficult to search on as lots of things have location in the name.

Please help!

Report •

Ask Question