Page 1 of 1 1
Topic Options
#203908 - 2011-12-12 02:32 PM Time Zone
Jacob_Kreed Offline
Fresh Scripter

Registered: 2001-12-14
Posts: 19
Loc: UK
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.

Top
#203909 - 2011-12-12 03:04 PM Re: Time Zone [Re: Jacob_Kreed]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Please do not double post.
See: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=203899#Post203899
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 323 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.127 seconds in which 0.066 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org