Is there a way to place chm generated chw files to one folder?
Every time I open a chm file, the chm viewer hh.exe would produce a chw file(the index file). Now I want to hide this type of file or force the generated chw files to specific folder. Is there a way out? Thanks in advance.
September 30th, 2010 4:04am

Hi, First, please understand that a CHM file can contain links to other CHM files. When opening such a CHM file for the first time, the HTML Help viewer creates an index file with the extension ".chw". The CHW file contains all the index terms of the master and linked CHM files, and enables faster searching for indexed terms. You may use the Windows PowerShell to implement. For more information, please refer to the following link: Move Files and Folders As this issue is script related, in order to get the answer effectively, if there is any questions, it is recommended to post a new thread in Scripting Forums for discussion. Regards, Sabrina This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
October 4th, 2010 5:35am

You didn't exactly answer his question, Sabrina. I too would appreciate a better answer. To actual problem is this: I create a product with an installer, etc, that includes not only the product binaries but also a Help file (.chm) as well. The customer installs the product into the default location. The product -- and its associated .chm Help file too! -- all get installed into the C:\Program Files\FooBarCo\ProdName directory. So far so good. Not the customer runs the product and presses F1 (or selects "Help" from the Help menu). Now there is a .chw file also in the C:\Program Files\FooBarCo\ProdName directory. The customer decides to uninstall the product. The uninstaller removes everything it added to that directory. Since it did not add the .chw file, it doesn't get deleted. Now the customer sees a .chw file that still exists in our product's directory and calls us asking why our product failed to properly uninstall itself: "What is this .chw file?", "Why did you not delete it when I asked youto uninstall your product?", "I didn't create that file! You must have created it! Why does your product leave files laying around on my system even after I uninstall it?", etc... If we can know for certain that a .chw file will always be created as you seem to imply, then we can add that file to our uninstaller to make sure it always also gets deleted along with everything else. But a better solution would be if HTML Help Viewer allowed to to specify some other directory where the .chw file is created, as the original person asked. You did no answer his question. You simply punted it (passed the buck!) to someone else. So let me ask the question straight out: are we responsible for maintaining the .chw file? Or is Microsoft responsible for maintaining it? In my opinion, since you (Microsoft) created it, you should be the one to delete it whenever our product is uninstalled. We could easily re-design our uninstaller to always delete all/any .chw files it finds in the product directory, but is that the correct solution? It seems risky to me. It'd be better in my opinion you you (Microsoft) to not go around creating files in our product directory that we didn't ask for. How can we prevent this from happening? Thank you. "Fish" (David B. Trout)
January 17th, 2011 1:29am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics