ReverendJ1 Posted February 8, 2007 Share Posted February 8, 2007 (edited) I have written a program to update the daylight savings time on one or more computers at a time. This will make getting computers DST 2007 (the new daylight savings time change) compliant a lot easier than manually using the TZEdit tool provided by Microsoft on every computer.Features:- Adaptable, meaning you can use it for whatever DST change there is, although the changes for DST2007 are the defaults- Should update the DST for Win 9x, ME, NT, 2000, 2003* or XP. (Vista not supported, I am not sure what would happen if it was run on a Vista machine. Vista has the updated DST info anyway.)- You can update the computer the program is run on- You can update just a single remote computer- You can update a list of computers (stored as a csv file in the program folder, so you can easily export a computer list from Excel or Access)- You can update an IP range- Allows yo to run as many commands as you want after the update (useful for other DST patches)- Full printable report once completeTo run this you will need administrative rights on all computers you want to update, have remote registry turned on, as well as admin shares. Your users may also notice the Time Zone control panel applet pop up for a split second on their screen, but it shouldn't affect their work. This will work on users who are logged off too, but they will have to manually close the Time Zone control panel applet window once they log in. If you used the old version (1.0) you will need to redo it with this version, (sorry) otherwise the time zone information will not change unless an administrator opens up and closes each users Time Zone control panel applet.I got it hosted on Sourceforge.net so you can download it there.Day Saver 1.5 SourceDay Saver 1.5 No InstallDay Saver 1.5 SetupYou may also visit my webpage I made for it. I made some quick and dirty documentation for it there.http://johnny5source.googlepages.com/daysaverLet me know what you think. I figure it should save any network admin with 50 or more pre-XP machines about a day of manually running the TZEdit program on each machine, hence half the reason for the name.***NOTE*** - There have been a couple reports of this program deleting the Eastern Time Zone when run on Windows 2003 servers. Please be weary when running on a Windows 2003 server until this bug has been fixed. If this happens, you can download Microsoft's TZEdit here (Windows NT, 2000, XP or 2003) or here (Windows 95, 98 or ME).*Edit - Updated everything for new version. Edited March 12, 2007 by ReverendJ1 Link to comment Share on other sites More sharing options...
fisofo Posted February 9, 2007 Share Posted February 9, 2007 This is a fantastic idea and I can definitely, definitely, use it. One thing I didn't see though: have you tested it? j/k.I'll look over the source, but this aught to really make my job easy, you rock. Link to comment Share on other sites More sharing options...
ReverendJ1 Posted February 9, 2007 Author Share Posted February 9, 2007 @fsifo - Thank you for the praise, it makes it all worth it. I figured I could spend a day or two writing a program to do this automatically, and hopefully help save a lot of time for a lot of other people, or I can spend a day or two manually changing everyone's DST information. As far as testing goes, I tested it on a few machines (Win 2000 and XP). I don't have any pre-Win 2000 machines to test it on, but it should work. It knows the difference between Windows versions and makes changes accordingly. Basically it just makes a few registry changes, which if you have read anything about any of the Microsoft solutions, that is exactly what they do too. If anyone wants to test and let me know how it works for them, that would be great. I also have only RUN the program from Win XP, but have updated 65+ Win 2000 & XP machines successfully. Also, sorry about the no comments in the source code, I have a bad habit of writing programs and then putting in the comments later. I will add them as soon as I get time, and re-release it. I think I make my code fairly easy to read anyway. At least it is for me. Link to comment Share on other sites More sharing options...
fisofo Posted February 10, 2007 Share Posted February 10, 2007 @fsifo - Thank you for the praise, it makes it all worth it. I figured I could spend a day or two writing a program to do this automatically, and hopefully help save a lot of time for a lot of other people, or I can spend a day or two manually changing everyone's DST information. As far as testing goes, I tested it on a few machines (Win 2000 and XP). I don't have any pre-Win 2000 machines to test it on, but it should work. It knows the difference between Windows versions and makes changes accordingly. Basically it just makes a few registry changes, which if you have read anything about any of the Microsoft solutions, that is exactly what they do too. If anyone wants to test and let me know how it works for them, that would be great. I also have only RUN the program from Win XP, but have updated 65+ Win 2000 & XP machines successfully.Also, sorry about the no comments in the source code, I have a bad habit of writing programs and then putting in the comments later. I will add them as soon as I get time, and re-release it. I think I make my code fairly easy to read anyway. At least it is for me. No worries on the comments, it was fairly straightforward to figure it out. Now I just wish your code could handle exchange servers Anyway, I'll be rolling this out in the next week or two, so I'll be sure to report back on performance... thanks again! Link to comment Share on other sites More sharing options...
ReverendJ1 Posted February 19, 2007 Author Share Posted February 19, 2007 I made a website for Day Saver, check it out at http://johnny5source.googlepages.com/daysaver. Link to comment Share on other sites More sharing options...
ReverendJ1 Posted February 22, 2007 Author Share Posted February 22, 2007 I noticed a small bug that I'm working on with Day Saver. It does not actually update the time zone information unless you open up the Time Zone control panel applet. I am working on fixing this and will post an update once I get it figured out. Link to comment Share on other sites More sharing options...
ericjensen Posted February 27, 2007 Share Posted February 27, 2007 I noticed a small bug that I'm working on with Day Saver. It does not actually update the time zone information unless you open up the Time Zone control panel applet. I am working on fixing this and will post an update once I get it figured out.First off, great script! It has helped me update a crap load of windows 2000 computers in our network. I recently noticed the time zone refresh problem myself, and there is a vbs script that M$ provides. Maybe you can incorporate the code into your script. Here is the site from M$: http://support.microsoft.com/kb/914387Keep up the great work!Eric Link to comment Share on other sites More sharing options...
ptrex Posted February 28, 2007 Share Posted February 28, 2007 @ I did a quick translation for those who need it (I don't ) expandcollapse popup; http://support.microsoft.com/kb/914387 ; Refresh TZI info for USA Dim $objReg, $objSh, $szTzsKeyPath, $arrTzSubKeys $objSh = ObjCreate("WScript.Shell") ;Get the StandardName key of the current time zone $szStandardName = $objSh.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\StandardName") ;Enumerate the subkeys in the time zone database const $HKEY_LOCAL_MACHINE = 0x80000002 $objReg=ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") $szTzsKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones" $objReg.EnumKey ($HKEY_LOCAL_MACHINE, $szTzsKeyPath, $arrTzSubKeys) ;Step through the time zones to find the matching Standard Name $szTzKey = "<Unknown>" For $subkey In $arrTzSubKeys If ($objSh.RegRead("HKLM\" & $szTzsKeyPath & "\" & $subkey & "\Std") = $szStandardName) Then ;Found matching StandardName, now store this time zone key name $szTzKey = $subkey EndIf Next If $szTzKey = "<Unknown>" Then ;Write entry to the Application event log stating that the update has failed to execute $objSh.LogEvent (1, "DST 2007 Registry Update and Refresh failed to execute on this computer. Time zones failed to enumerate properly or matching time zone not found.") ;VA Wscript.Quit 0 EndIf ;Launch control.exe to refresh time zone information using the TZ key name obtained above $objSh.Run ("control.exe timedate.cpl,,/Z" & $szTzKey) ;Get current display name of refreshed time zone $szCurrDispName = $objSh.RegRead("HKLM\" & $szTzsKeyPath & "\" & $szTzKey & "\Display") ;Write entry to the Application event log stating that the update has executed $objSh.LogEvent (4, "DST 2007 Registry Update and Refresh has been executed on this computer." & chr(13) & chr(10) & chr(13) & chr(10) & "Current time zone is: " & $szCurrDispName & ".") Enjoy !! ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ReverendJ1 Posted February 28, 2007 Author Share Posted February 28, 2007 Thanks guys. I already had that part figured out though. Well, the important part at least ("control.exe timedate.cpl,,/Z") which will open up the Time Zone Applet. I think I got the rest of this just about done. Sorry for the delay, I've been busy at work with other projects. I SHOULD be able to post a final today. Link to comment Share on other sites More sharing options...
ReverendJ1 Posted February 28, 2007 Author Share Posted February 28, 2007 Day Saver is now complete! (I think) It now actually updates the DST information, instead of just making the registry change. Thanks Dufran3 for pointing that out! It also allows you to run as many commands afterwards as you want, so you can use it to do other DST patches as well! Link to comment Share on other sites More sharing options...
flyingboz Posted March 6, 2007 Share Posted March 6, 2007 (edited) Day Saver is now complete!Solid job with the execution. I did find a couple of niggles that I would pass along as suggestions:1) When updating a list of computers, providing the results in csv (or other flatfile) format would be preferable to an html based report, to enable network admins to quickly isolate the 'problem children'.2) I found the report.html layout unclear -- It was not immediately apparent that there was not an error. I would recommend a result line per host, in some kind of table format for clarity and readability. The error descriptions more properly belong in a footer, IMO.3) There is no way out if you decide you want to cancel while entering data in some of the fields -- like an ip range.Again, great job w/ the core functionality! Thank you for sharing this with the community.I have tested 1.5 with both windows 2000 pro and w2k advanced server with positive results. Planning a full rollout shortly. Edited March 6, 2007 by flyingboz Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
ReverendJ1 Posted March 7, 2007 Author Share Posted March 7, 2007 @flyingboz - Thank you for using my program. It makes me very happy to hear people are getting good use of this. I tried to make the report as easy as possible. It very quickly shows with who and what the problems are. If the computer name is in the 'Success' column then everything ran fine and the time zone info was updated correctly. If it is in the 'Could Not Ping' column then the computer could not be pinged, hence is probably not on. If it is in the 'Could Not Connect' column, then it means Day Saver couldn't connect to it, meaning you probably aren't an administrator on the remote machine, or the firewall is turned on. The machine name will show up under 'Registry Error' if there was a problem writing to the registry. I don't see how a csv file could be any easier. Putting it in an html report also allows me to open it up for printing and allow formatting. The error descriptions are basically in a footer. I mean they go after the last computer anyways. As far as allowing you to cancel out of some of the data fields, it was something I planned on adding, but never got around to it. I was mostly focused on making it work and getting it out in enough time that people could use it. I guess I could now, but it would be kind of late, seeing as how Daylight Savings Time is in 4 days. -J5 Link to comment Share on other sites More sharing options...
flyingboz Posted March 7, 2007 Share Posted March 7, 2007 @J1 ty for keeping me from having to do it all myself, i found you on a forum search before jumping in to write it. I'll make the mods I want /need to your code (presuming your permission.) If you are interested, I'd be happy to PM or post the diffs. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
jftuga Posted March 8, 2007 Share Posted March 8, 2007 @J1ty for keeping me from having to do it all myself, i found you on a forum search before jumping in to write it. I'll make the mods I want /need to your code (presuming your permission.)If you are interested, I'd be happy to PM or post the diffs.Could you post or PM me please? I need to update 80 Win 2000 computers tonight or tomorrow night. -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
ReverendJ1 Posted March 8, 2007 Author Share Posted March 8, 2007 Sorry about the late replies, for some reason my email notification isn't working right. @flyingboz - I don't care if you change the program to suit your needs. Thats what its all about. Please post it here in case other people would want export to csv functionality. @jftuga - You can use the program/source included at the beginning of this post to update your machines. Flyingboz just wanted to make a couple adjustments to it. Link to comment Share on other sites More sharing options...
nitekram Posted March 12, 2007 Share Posted March 12, 2007 (edited) I need help - I ran this on a 2003 server and now I have no EST listed - anyhelp? Also it did not look like it took as I had to change the time manually, not sure - it did run fine on the the other 15 or so computers, had some issues with 3 others, but I did the server with the application running local and remote - same issue - EDIT could not run remotely.So between:Bogota, Lima, QuintoNOTHING - no Eastern Time (Us & Canada)Indiana (East)Thanks for your help.EDIT - I have looked at the code and I may just manually add the entry back - i hope this works, what I am doing is taking another pc and exporting the entry for EST and then going to import it into the server Edited March 12, 2007 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow."  WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI  CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
flyingboz Posted March 12, 2007 Share Posted March 12, 2007 I need help - I ran this on a 2003 serverIf you have latest service packs uploaded, you have no need to run this on an xp or 2003 box... I suppose the code could be modified to keep you from doing something silly, a la if @OStype .... Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
nitekram Posted March 12, 2007 Share Posted March 12, 2007 If you have latest service packs uploaded, you have no need to run this on an xp or 2003 box... I suppose the code could be modified to keep you from doing something silly, a la if @OStype ....Well in this case the server was not update (my fault - *BAD ADMIN* - was planning upgrade at end of this quarter, changed to today). Anyway the REG inport did not work, even after telling everyone to get off the server to do a reboot. I ended up downloading the patch from MS and it put everything back in place - and YES I am back seeing EST (that was weird though). Thanks for the help anyway. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow."  WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI  CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
spac3m0nk3y Posted March 12, 2007 Share Posted March 12, 2007 I did something like this about a week ago, except my problem was finding which of our XP computers had SP2 and the patch and which ones didn't. I hacked a VB script to give me a quick report of the computers on our domain in this respect. We had to install SP2 on quite a few XP boxes and then I manually updated the rest. This is a great utility, but I would suggest all the admins get their XP clients up to date with SP2 and then install the KB931836 patch to get the daylight savings time update. Took us a while here, but we learned which clients weren't updating correctly. Website: http://www.mayniac.org Link to comment Share on other sites More sharing options...
ReverendJ1 Posted March 12, 2007 Author Share Posted March 12, 2007 Sorry for the late reply, I am not getting my email notifications for some reason. There does seem to be a bug in it when it comes across a Server 2003 box. I have received one other report of this happening, but have no 2k3 box to check. I assume it is not correctly determining the OS for Windows 2003 machines. If this happens, you can download Microsoft's TZEdit here (Windows NT, 2000, XP or 2003) or here (Windows 95, 98 or ME). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now