Search code examples
installshield

InstallShield: How to leave a driver after uninstall?


Our installer installs a USB driver for some custom hardware. During development, we frequently uninstall one version and reinstall another (usually a newer version but sometimes older - the driver never changes.) Despite the InstallShield "Component" being marked "Uninstall No" on the component configuration page, the driver is in fact removed.

When the new version is installed, the driver is once again reinstalled, but since it has previously been removed, none of the USB devices are found. If we physically remove and reinstall the USB modules, the driver is loaded properly.

How do I tell InstallShield to leave the driver alone during uninstallation? Truthfully, it is, at worst, an inconvenience, but it is highly problematic that making an explicit configuration setting that says "Uninstall No" is ignored by InstallShield.


Solution

  • You could mark the component to which the driver is associated as permanent, but then there's no way to remove it.

    It sounds like you need to structure things differently. Either you can use an approach that doesn't fully uninstall things during an upgrade (such as a major upgrade with RemoveExistingProducts scheduled late), or by splitting the driver into a separate package so that there's no need to try to uninstall the driver.

    If you split the packages, you could either install the driver package as a prerequisite dependency that would be uninstalled manually from Programs and Features, or you could leverage the Suite project and just upgrade the non-driver package. With the either of those approaches you would not have to worry about the scheduling of RemoveExistingProducts in the non-driver package.