0
votes

I am working on custom managed bootstrapper application in wix. My installer installs .Netframework461(if needed), redist_x86 and msipackage of my application.

My new requirement is along with the above components I need to install an InstallShied exe. I could silently install the installshield exe, but uninstallation of installshield is not happening with my installer.

The code I have added in wix bundle file is given below:

<PackageGroup Id ="InstallShield">
  <ExePackage Id="InstallShield" DisplayName="InstallShield" InstallCommand="/s /v/qn" UninstallCommand="/x /s /v/qn" PerMachine="yes" Vital="yes" Permanent="no" SourceFile="setup.exe" Compressed="yes"/>
</PackageGroup>

Another interestting part is that I could install and uinstall the same InstallShield exe silently using the same commands used in the code in command prompt.

Both my installer and command prompt is in run as administrator mode.

Also on more research I get to know after silent install it erases exe details so it does not get the installshield exe for uninstallation. I don't know it is right observation or not. The error shown in my log file is shown below.

enter image description here

I got one solution like to generate a response file for installation. The command I found is given below.

Setup.exe /s /f1"[SETUPSUPPORTDIR]\Setup.iss"

But my question is how can I silently uninstall with respect to the above response file. What is the correct uninstallcommand for this?

3
Different types of InstallShield bootstraps need different command lines to execute silently. Do you know what kind of project it was built from, or otherwise have documentation that tells you what parameters to call it with?Michael Urman

3 Answers

1
votes

You have no DetectCondition on your ExePackage so there is no way for the bootstrapper to determine whether or not the executable is installed when installing or uninstalling.

A condition that determines if the package is present on the target system. This condition can use built-in variables and variables returned by searches. This condition is necessary because Windows doesn't provide a method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this package during a bundle action; for example, if this condition is false or omitted and the bundle is being installed, Burn will install this package.

Usually you do a detect condition by having a RegistrySearch look for a specific registry key or location that exists when your product is installed and you either set a variable to its value or true or false on whether it exists or not. Then your detect condition can easily be evaluated based on the variable's value and you bootstrapper will know to try an uninstall or install the product.

1
votes

Change 'Permanent="Yes"' to 'Permanent="no"'. Currently your installer will not even attempt to remove the .exe package on uninstall as it is listed as permanent.

0
votes

I am not sure, but you probably need to create a response file for the Installshield setup.exe uninstall process (which will be a different response file from the one created during installation). See this answer: Installshield Silent Uninstall not working at Command Line

setup.exe switches:

And throwing this in for good measure: http://unattended.sourceforge.net/installers.php