knappster
knappster

Reputation: 401

WIX uninstall error

Whenever I try to uninstall my WIX installation via Add/Remove Programs or the uninstall shortcut I put down with the installation, I keep getting the following error:

a network error occurred while attempting to read from the file c:\windows\installer\MyProduct.msi

But if I use the original installer and select uninstall then it is fine. Why is this happening as obviously you can't expect customers to hang onto the original installer if they need to uninstall my product!

After some testing it seems that if I install then uninstall straight away then it is fine, but if I log off or restart the computer then I get the error.

Update: Once an install is finished I run a custom action to delete a folder which temporarily holds some database files used during the install. After digging around it seems that the uninstall is trying to access these files, why would it be doing that, it has nothing to do with uninstallation?

Upvotes: 2

Views: 1265

Answers (1)

Cosmin
Cosmin

Reputation: 21416

"C:\Windows\Installer" folder is the Windows Installer cache. It's used to store MSI packages for installed products. These packages are used by Windows Installer when performing a repair or modify operation on the product.

In your case the uninstall process needs some files which are missing. The MSI in Windows Installer cache is not complete (it's just a stripped down version), so you are prompted for the original package.

Usually this behavior is triggered by custom actions which try to use files that are not available during uninstall. Try creating an uninstall log to see what triggers this.

Upvotes: 2

Related Questions