Just in case you ever decide to update this script, I'd request command line params for language and main window title, or produce an .hhp project file that can be edited. On English Language versions of Windows, because the language in the compiled CHM is French, the main window title will always say "HTML Help" instead of the title. It's something to do with unicode vs ansi and code pages. I decompiled the output and created an .hhp file specifying English language, main window title, and default htm page to get it to work with a help launcher that saves the window position and size by title. But that starts to take the automation out of it. Although trying to decompile several CHM by hand is a hassle, as you found out while debugging I'm sure.
I tried a CHM editor app. Editing the CHM in place changing language and title will not work. The main title says HTML Help no matter what.
If you have no longer any interest in working this utility would you consider posting the source?
Thanks again for the program.