I need to set Time Zones for users, who travelled from country to country
Specifficaly, Leeds (uk)to New York or Chicago.

code:
 Code:
shell "c:\scripts\envtscip.exe > %temp%\ipaddress.txt" 
sleep 5 
$x=open(1,"%temp%\ipaddress.txt")
$ip=readline(1)

$Systems= LTRIM(substr($ip,18,11))  ; 10.176.192/193
$NY=LTRIM(Substr($ip,18,9))  ; 10.80.84
$CH=LTRIM(Substr($ip,18,9))  ; 10.78.11
SELECT 
	CASE $Systems="10.176.192"
	Shell "REGEDIT.EXE /S C:\Scripts\USA.Reg"
	Shell  "Regedit.exe /S C:\Scripts\NewYork.reg"
	Shell "cscript \\firefly101\NETLOGON\time.vbs"
	;Shell "\\firefly101\NETLOGON\timezone.cmd"
	? "Timezone set to GMT"
	sleep 1
	CASE $NY="10.80.84"
	Shell "REGEDIT.EXE /S C:\Scripts\USA.Reg"
	Shell "Regedit.exe /S C:\Scripts\NY.reg
	? "TimeZone set to EST"
	Sleep 1
	CASE $CH="10.78.11"
	? "TimeZone Set to CST"
	Sleep 1
	
ENDSELECT








Edited by Mart (2011-12-12 03:02 PM)
Edit Reason: Please use code tags when posting code.