#203899 - 2011-12-09 08:55 AM
Time Zones- International Roaming- Kix Script - Help
|
Jacob_Kreed
Fresh Scripter
Registered: 2001-12-14
Posts: 19
Loc: UK
|
I did to create a kix script, to change the time from GMT to EST by ip address as the users login
shell "c:\scripts\getipadr.cmd" : Collect WTSClientAddress
sleep 5
$x=open(1,"%temp%\ipaddress.txt")
$ip=readline(1)
$Systems= LTRIM(substr($ip,18,11)) ; Test IP Address
$NY=LCASE $Systems="10.176.192" ; Test Scope
Run "REGEDIT.EXE /S C:\Scripts\USA.Reg" : Registory for USA
Run "Regedit.exe /S C:\Scripts\NY.reg" : Registory for EST
? "Timezone set to GMT"
sleep 1
CASE $NY="10.20.84"
Run "REGEDIT.EXE /S C:\Scripts\USA.Reg"
Run "Regedit.exe /S C:\Scripts\NY.reg
? "TimeZone set to EST"
Sleep 1
CASE $CH="10.50.11"
? "TimeZone Set to CST"
Sleep 1
ENDSELECTTRIM(Substr($ip,18,9)) ; 10.20.84
$CH=LTRIM(Substr($ip,18,9)) ; 10.50.11
SELECT
Edited by Mart (2011-12-09 09:58 AM) Edit Reason: Please use code tags when posting code.
|
Top
|
|
|
|
#203902 - 2011-12-09 04:19 PM
Re: Time Zones- International Roaming- Kix Script - Help
[Re: BradV]
|
Jacob_Kreed
Fresh Scripter
Registered: 2001-12-14
Posts: 19
Loc: UK
|
All the servers are hosted in the UK,
|
Top
|
|
|
|
#203910 - 2011-12-12 05:19 PM
Re: Time Zones- International Roaming- Kix Script - Help
[Re: Allen]
|
ShaneEP
MM club member
   
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
|
Something like this maybe?
shell "c:\scripts\envtscip.exe > %temp%\ipaddress.txt"
$nul = Open(1,"%temp%\ipaddress.txt")
$ip = ReadLine(1)
$nul = Close(1)
$systems = SubStr($ip,18,11)
$ip = SubStr($ip,18,9)
Select
Case Left($systems,10) = "10.176.192"
Shell 'Regedit.exe /S C:\Scripts\USA.Reg'
Shell 'Regedit.exe /S C:\Scripts\NewYork.reg'
Shell 'control.exe timedate.cpl,,/Z GMT Standard Time'
Case Left($ip,8) = "10.80.84"
Shell 'Regedit.exe /S C:\Scripts\USA.Reg'
Shell 'Regedit.exe /S C:\Scripts\NY.reg'
Shell 'control.exe timedate.cpl,,/Z Eastern Standard Time'
Case Left($ip,8) = "10.78.11"
Shell 'control.exe timedate.cpl,,/Z Central Standard Time'
EndSelect
|
Top
|
|
|
|
#203914 - 2011-12-13 12:56 AM
Re: Time Zones- International Roaming- Kix Script - Help
[Re: ShaneEP]
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11625
Loc: CA
|
This is a GPO setting and should not be setup using any type of script. I have it set and my users around the World see the time from their local workstation just fine.
Configuring Terminal Server for Differing Time Zones
Configuring Terminal Server for Differing Time Zones
Updated: March 28, 2003
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
By default Terminal Server keeps track of time according to the time zone in which it has been configured, rather than on a per-user basis. This can be a problem when a user connects to a terminal server outside of the time zone in which the user is located because the local computer uses the time configured on the terminal server rather than the local time. If you are hosting time-sensitive applications on your terminal server or if you have processes in place that depend on the user’s current local time, such as financial systems and calendaring, you might want to enable the Allow Time Zone Redirection Group Policy setting. This policy is located in Windows Components/Terminal Services. With this setting enabled, Terminal Services uses the server base time on the terminal server and the client time zone information to calculate the time on the session.
Allow time zone redirection
This policy setting determines whether the client computer redirects its time zone settings to the Terminal Services session.
If you enable this policy setting, clients that are capable of time zone redirection send their time zone information to the server. The server base time is then used to calculate the current session time (current session time = server base time + client time zone).
If you disable or do not configure this policy setting, the client computer does not redirect its time zone information and the session time zone is the same as the server time zone. noteNote Time zone redirection is possible only when connecting to at least a Windows Server 2003 terminal server with a client that is using RDP 5.1 or later.
All Group Policy Settings for Terminal Services in Windows Server 2008
The link above shows many other policies that can be set for Terminal Server
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 581 anonymous users online.
|
|
|