#46991 - 2003-10-19 04:18 PM
Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
hello,
i've got a little problem at my company.. i live in the nederlands and the clock uses Daylight saving changes. In the summer is it GMT +2 and in the winter is it GMT +1
but automatically adjustment is disabled on all my computers, so i created this script:
code:
If ExistKey ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation") =0 $Autodaylight = ReadValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DisableAutoDaylightTimeSet") If $Autodaylight = "1" DelValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DisableAutoDaylightTimeSet") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DayLightName","W. Europe Daylight Time","Reg_SZ") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","ActiveTimeBias","ffffff88","REG_DWORD") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DaylightBias","ffffffc4","REG_DWORD") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DaylightStart","00 00 03 00 05 00 02 00 00 00 00 00 00 00 00 00","REG_BINARY") EndIf EndIf
can anybody tell me of this will work??? i have to implement this next week.
by the way, if i adjust it manually, all appointments moves 1 hour forward...
thnx in regard,
marcel
message added for use with code button [ 19. October 2003, 16:33: Message edited by: Marcel Henderik ]
|
Top
|
|
|
|
#46992 - 2003-10-19 04:27 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
PS,
the clients are Windows XP...
|
Top
|
|
|
|
#46993 - 2003-10-19 04:27 PM
Re: Change Daylight saving changes
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Marcel,
Please, when posting code, please use the CODE Button below to place your code between the [CODE]..[/CODE] tags.
Will this work?
What happens when you test it? Do your users have rights to do so? Generally speaking, HKLM, you would need Administrative access to write to this key of the registry.
With your DELVALUE, WRITEVALUE, etc. you should preceed the command with a $RC= or equivalent to suppress the results for your users. Having this off for the time being is good to see the results.
The REG_BINARY, should be -
"00000300050002000000000000000000"
HTH,
Kent
|
Top
|
|
|
|
#46994 - 2003-10-19 04:32 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
sorry,
next time i will use the code button..
all my users are at this time local admin so, that would not cause a problem.
when i run the script, the adjustment are made, but, my time will not jump one hour forward (still summertime), but when i made the adjustment manually, the time will jump...
quote: The REG_BINARY, should be -
"00000300050002000000000000000000"
ok thnx. i will made the adjustment.. [ 19. October 2003, 16:34: Message edited by: Marcel Henderik ]
|
Top
|
|
|
|
#46995 - 2003-10-19 04:54 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
ok, when i press the OK button (de button with you see when you dubble click the time) after running the script, it will adjust the the time with one hour...
|
Top
|
|
|
|
#46996 - 2003-10-19 06:24 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
nobody any idea?
|
Top
|
|
|
|
#47000 - 2003-10-20 06:01 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
Sorry, but even a reboot doen't do the trick.. also a resync of the time doens't doe the trick
why windows should accept this trick?? how else kan i make an ajustment with the time zone.
i acutally want te place just one ajustment with you're timezone information, cause my customer makes one huge mistake, 5 years ago....
ikm just a cleaner...
|
Top
|
|
|
|
#47001 - 2003-10-21 07:01 AM
Re: Change Daylight saving changes
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
You can apply these changes by hand, right?
If we look at KiXtart FAQ & How to's
We see Registry Tools
and specifically Regshot
So, you should see the before and after effects and record these.
HTH,
Kent
|
Top
|
|
|
|
#47003 - 2003-10-21 10:02 AM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
i wish that nettime works, but it looks like he misses some adjusment..
wel, witg regshot i saw some more keys and values then i saw with regsnap (the tool witch i normally uses..)
code:
Values deleted:2 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DisableAutoDaylightTimeSet: 0x00000001 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DisableAutoDaylightTimeSet: 0x00000001
Values modified:8 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DaylightName: "W. Europe Standard Time" HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DaylightName: "W. Europe Daylight Time" HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DaylightBias: 0x00000000 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DaylightBias: 0xFFFFFFC4 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DaylightStart: 00 00 0A 00 05 00 03 00 00 00 00 00 00 00 00 00 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\DaylightStart: 00 00 03 00 05 00 02 00 00 00 00 00 00 00 00 00 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\ActiveTimeBias: 0xFFFFFFC4 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\ActiveTimeBias: 0xFFFFFF88 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightName: "W. Europe Standard Time" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightName: "W. Europe Daylight Time" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightBias: 0x00000000 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightBias: 0xFFFFFFC4 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightStart: 00 00 0A 00 05 00 03 00 00 00 00 00 00 00 00 00 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\DaylightStart: 00 00 03 00 05 00 02 00 00 00 00 00 00 00 00 00 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias: 0xFFFFFFC4 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias: 0xFFFFFF88
im going to try those...
let you know wat happens,
ps, sorry for my english.... this costs me a lot of my regular sleep at night..
|
Top
|
|
|
|
#47005 - 2003-10-22 12:25 AM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
hehehe we really could, but i rather keep it in english so the that the others might try to understand me, but i FOUND my bug!!!!
code:
If ExistKey ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation") =0 $Autodaylight = ReadValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DisableAutoDaylightTimeSet") If $Autodaylight = "1" DelValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DisableAutoDaylightTimeSet") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DayLightName","W. Europe Daylight Time","Reg_SZ") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","ActiveTimeBias","0xFFFFFF88","REG_DWORD") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DaylightBias","0xFFFFFFC4","REG_DWORD") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DaylightStart","00000300050002000000000000000000","REG_BINARY") Shell "%COMSPEC% /c net time \\server /set" EndIf EndIf
by DaylightBias it must be 0xFFFFFF88.. but i wrote: ffffff88.. well that doens't do the trick
and that costed me almost a week.. pfff... i uses the older version of regsnap and it gaves me the output i usses..ffffff88
thnx anybody for you're help!
now i need some more coffee.
|
Top
|
|
|
|
#47007 - 2003-10-21 01:27 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
ghehhe allmost... just need to find out why my server can't synchronise with a timeclock on the internet.
problably a firewall rule... but therefore i need to contact the ISP.
then i take some rest
|
Top
|
|
|
|
#47008 - 2003-10-21 02:31 PM
Re: Change Daylight saving changes
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Marcel,
You posted that 0xFFFFFF88 was the needed step..
Let's get some help from the documentation here.
If we do some digging under READVALUE...
"REG_DWORD variables are returned in decimal format"
Wouldn't that mean that these can also be written in Decimal Format?
For example, I see 4294967236 (FFFFFFC4) using Registry Commander.
So, we take your FFFFFF88 into Windows Calculator as a Hex and get 4294967176 in Decimal.
HTH,
Kent
|
Top
|
|
|
|
#47010 - 2003-10-22 07:51 PM
Re: Change Daylight saving changes
|
Marcel Henderik
Fresh Scripter
Registered: 2003-03-11
Posts: 14
Loc: Netherlands
|
im not such a specialist in KIX... so
but maybe it's strange but this works:
code:
If ExistKey ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation") =0 $Autodaylight = ReadValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DisableAutoDaylightTimeSet") If $Autodaylight = "1" DelValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DisableAutoDaylightTimeSet") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DayLightName","W. Europe Daylight Time","Reg_SZ") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","ActiveTimeBias","0xFFFFFF88","REG_DWORD") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DaylightBias","0xFFFFFFC4","REG_DWORD") WriteValue ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation","DaylightStart","00000300050002000000000000000000","REG_BINARY") Shell "%COMSPEC% /c net time \\Testsrv /set" EndIf EndIf
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
2 registered
(morganw, mole)
and 414 anonymous users online.
|
|
|