D
dhbayne
Hi,
I have a .NET assembly, written in C#, which has the RunInstaller(true)
attribute, and inherits from one of our utility classes called
BaseInstaller, which in turn inherits from the Installer class.
This assembly is contained in an InstallShield 10.5 generated MSI.
InstallShield uses InstallUtilLib to install and uninstall Installer
assemblies like this one.
Normally, this works fine; the assembly is installed during
installation, and uninstalled during uninstallation.
The problem is when I patch or upgrade the MSI. When this happens, the
assembly is installed a second time, which appears to corrupt the data
in the InstallState file.
Prior to the patch, the InstallState file contains Dictionary data:
<a1:Hashtable id="ref-15"
xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections">
<LoadFactor>0.72</LoadFactor>
<Version>3</Version>
...
</SOAP-ENC:Array>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
However, after the patch or upgrade (and the second call of
InstallUtilLib against the assembly), all of this information is
missing from the InstallState file, and uninstallation fails with the
following exception:
Exception Type: System.ArgumentException
Message: The savedState dictionary contains inconsistent data and
might have been corrupted.
ParamName: NULL
HelpLink: NULL
Source: System.Configuration.Install
at System.Configuration.Install.Installer.Uninstall(IDictionary
savedState)
at MyLibrary.BaseInstaller.Uninstall(IDictionary savedState)
There is obviously something I'm missing here. Has anyone any idea
what it could be? TIA for any help.
Yours,
Duncan Bayne
I have a .NET assembly, written in C#, which has the RunInstaller(true)
attribute, and inherits from one of our utility classes called
BaseInstaller, which in turn inherits from the Installer class.
This assembly is contained in an InstallShield 10.5 generated MSI.
InstallShield uses InstallUtilLib to install and uninstall Installer
assemblies like this one.
Normally, this works fine; the assembly is installed during
installation, and uninstalled during uninstallation.
The problem is when I patch or upgrade the MSI. When this happens, the
assembly is installed a second time, which appears to corrupt the data
in the InstallState file.
Prior to the patch, the InstallState file contains Dictionary data:
<a1:Hashtable id="ref-15"
xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections">
<LoadFactor>0.72</LoadFactor>
<Version>3</Version>
...
</SOAP-ENC:Array>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
However, after the patch or upgrade (and the second call of
InstallUtilLib against the assembly), all of this information is
missing from the InstallState file, and uninstallation fails with the
following exception:
Exception Type: System.ArgumentException
Message: The savedState dictionary contains inconsistent data and
might have been corrupted.
ParamName: NULL
HelpLink: NULL
Source: System.Configuration.Install
at System.Configuration.Install.Installer.Uninstall(IDictionary
savedState)
at MyLibrary.BaseInstaller.Uninstall(IDictionary savedState)
There is obviously something I'm missing here. Has anyone any idea
what it could be? TIA for any help.
Yours,
Duncan Bayne