Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSI Uninstall issue: Error 1001 -> The saved State dictionary contains inconsistent data and might have been corrupted

I need to create a few Windows Services and obviously I would like to package them in a nice installer.

Since I was unfamiliar with Service creation/installation I basically used code from the following example:

Advanced Service Installation

I did not change ProjectInstaller or InstallActions and basically just plugged my own services (File monitoring/conversion).

Building and compiling the code works A-OK:

  1. The Installer works, the services are installed (but NOT started as might be expected)
  2. My Services themselves all work
  3. The Uninstall FAILS, stating the error from the title

What is very strange:

If, after the failed uninstall, I run "Repair" and subsequently manually remove *.Installstate from the installation folder, the uninstaller magically works.

This is driving me nuts.

I guess I could just document this quirk for the potential users of my service but I don't like not knowing what is really going on.

Debugging this sort of thing is really hard (wouldn't even know how) and documentation is very scarce (non-existing even).

Anybody with some tips?

like image 499
Kris Avatar asked Jan 29 '26 04:01

Kris


1 Answers

I solved this problem by doing this:

  • Go to the folder installation
  • Edit the file xxxxxxx.InstallState with notepad or an XML editor (where xxxxx is the name of your service)
  • Go to ArrayOfKeyValueOfanyTypeanyType node and then to Keys node
  • Delete anyType child
  • Go to the Values node and delete all anyType child
  • Save the file and try to uninstall

This works for me. regards

like image 105
user6263911 Avatar answered Jan 31 '26 18:01

user6263911