l33t
l33t

Reputation: 20016

Wix: Generated .chw file causes installation directory not to be deleted

My software comes with a HTML Help file (.chm). This file, together with my binaries, are included in my Wix Setup. The problem is that whenever the .chm file is opened a .chw file (HTML Help Index) is generated in the same directory. Then, when I uninstall my software this newly generated .chw file prevents the uninstaller to remove the installation folder.

How do I tell Wix to remove the folder even though this file has been created? I guess it's a bad idea to explicitly remove the folder since you don't know where the user chose to install the software.

What's the best Wix approach when facing auto-generated temporary files like this one?

Upvotes: 3

Views: 413

Answers (1)

wimh
wimh

Reputation: 15232

See Removing files when uninstalling WiX, add this to the folder where the chw file is created:

<RemoveFile Id="RemoveChw" Name="filename.chw" On="uninstall" />

You can also use *.chw to remove all chw files in that folder.

Upvotes: 2

Related Questions