briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Prerequisite uninstall file differs from install file

Hi,

I have two prerequisites that I install as part of a larger installation. In one case, I want to uninstall node.js (yes, I know what I'm doing and nobody else is using it). In another, I want to uninstall a desktop application. In both cases, the uninstall main module differs from the install main module. For node, you run msiExec on a GUID to uninstall versus running against a .msi installer to start with. In the other case, there is a setup.exe in a bundle folder for the installation, but a different setup.exe in an InstallShield folder for uninstall.

I'm using custom actions now, which predictable put up warning messages because you get two installers running at once. I would like to just have the prerequisite process handle this, but it can't seem to accommodate the idea that the uninstall .exe is different from the file path specified for the "Main Setup File".

Is there a way around this behavior?

Thank you,

Brian Corcoran
briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Prerequisite uninstall file differs from install file

Please ignore the part above regarding Node.js. I was incorrectly specifying the full path to the msiexec in that case, and have fixed it. For the issue with the desktop application, I seem to have an issue with a file disappearing before I need it. I'm trying to run a command line like:

c:\Program Files (x86)\InstallShield Installation Information\{40C9258E-732F-89D8-AAC9-BC595A5AF4C1}\setup.exe /f1 "[APPDIR]Uninstall.iss" -runfromtemp -l0x0409 -removeonly

At first, I thought APPDIR was not resolving correctly. However, I don't believe I get to that point. I can see the directory disappear before I get to the Prerequisite uninstall (it is a Feature pre-req). I have the Application folder marked as "Do not remove", so I don't understand this.

What do I need to do to make sure uninstall.iss is preserved until I am done needing it?

Thanks,

Brian
briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Prerequisite uninstall file differs from install file

I marked the .iss file as Permanent, which is not an ideal solution, to make sure it stays around. It did, but the APPDIR did not work as I hoped. I had to put in the full path for the uninstall to work. My question regarding removing files remains, but also does APPDIR not resolve for uninstall commands in Prerequisites?

Thanks,

Brian
Eusebiu
Posts: 4960
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite uninstall file differs from install file

Hi Brian,

The "APPDIR" property should be resolved to the installation folder of the main application during the uninstallation, too. Can you please send me the .AIP (project file) and a verbose log of the uninstallation to support at advancedinstaller dot com, so I can investigate them?

Indeed, if the "Uninstall.iss" file is included in the main package, it is removed before the prerequisite's removal. Setting it as permanent is a solution, but it cannot be removed after the prerequisite's removal because the main package exits before this.

Another solution is to create a simple MSI package containing only that file and place it as a prerequisite after the desktop application, so it will be uninstalled after that application.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Prerequisite uninstall file differs from install file

I put my changes that were failing back in to generate an aip file for you, and now they work. Frustrating. So, I apologize for wasting your time. I'll think about putting together a MSI package just for the install/uninstall of the .iss file.

Thank you,

Brian
Eusebiu
Posts: 4960
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite uninstall file differs from install file

You're welcome Brian. I'm glad the path problem was solved.

Just let us know anytime you need assistance.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”