codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Update Wise Installer exe with Advanced Installer msi

Our current client installers are a Wise Installer exe and I have converted them to an Advanced Installer msi (since this is what all our other installs use).

I used the AI converter to convert the Wise Installer file to an aip file. I'm trying to figure out how to get the new msi to uninstall the previous version (that was installed using the Wise exe) and then install the new msi. My installs work fine for a fresh install, but if the old program is installed I get the message: "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."

Do I need to add a custom action that will remove the old version? It sees there is another version so what makes it uninstall?

On the Upgrades screen it has both Automatically upgrade older product versions and Uninstall old version first and then install new version checked.

Our current Wise Installer exes work this way and I'd like the new msis to work the same way.

Thanks in advance.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Update Wise Installer exe with Advanced Installer msi

Hello,

In order to achieve what you want you can take a look on our "Upgrade an older version of the package" article which should be useful for you. Also, you can take a look on our Why do I receive the "Another version of this product is already installed" message? article.

Let us know if this helps, otherwise please give us more detail about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Update Wise Installer exe with Advanced Installer msi

Well I've found a way to uninstall our old version through the command line, but not sure how to do that through AI. I can call msiexec.exe /x {productcode} /qn and it does a quiet uninstall, but how do I call this in a custom action? I also need to send a command to a running 3rd party process to kill it and force it to uninstall itself, because we are no longer using it. Should I create a bat file or vbs to do this and call it from a custom action? Is there an easier way to do it?

Thanks,
Scott
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Update Wise Installer exe with Advanced Installer msi

Hello Scott,

Yes, you can create a BAT file and launch it using a custom action. For example, you can add the BAT file in "Files and Folders" page as a temporary file and run it using a "Launch file or open URL" custom action with sequence, scheduled after "Wizard Dialogs Stage -> Paths Resolution" action group. Please take a look on our "How do I launch a CMD or BAT file?" article which should be useful for you.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Update Wise Installer exe with Advanced Installer msi

Thanks, that should work. I currently get the "A previous version" message when I try to install. Is it possible to put a Dialog before that popup that tells the user a previous version exists, then call the custom action to uninstall the previous version? Even if I can't put it b/f that check, I'm not sure how to make a Dialog that only displays when a previous version is found and then calls the custom action when they hit next.

Thanks,
Scott
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Update Wise Installer exe with Advanced Installer msi

I have my installer calling the bat file, but it fails when I add the line msiexec /x {productcode} /qn this is what it shows in the log:

MSI (s) (F4:14) [12:10:09:227]: Running ExecuteSequence
MSI (s) (F4:14) [12:10:09:227]: Doing action: LaunchFileOrURL
Action 12:10:09: LaunchFileOrURL.
Action start 12:10:09: LaunchFileOrURL.
MSI (s) (F4:B4) [12:10:23:415]: Running as a service.
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action LaunchFileOrURL, location: C:\WINDOWS\Installer\MSI38.tmp, command: "C:\DOCUME~1\VMAdmin\LOCALS~1\Temp\UninstallOldVersion.bat"
Action ended 12:10:27: LaunchFileOrURL. Return value 3.
Action ended 12:10:27: INSTALL. Return value 3.

I can run the exact call in a command prompt and it works fine. is the msi not allowed to call msiexec from a bat?
raddad555
Posts: 23
Joined: Sat Feb 09, 2013 3:40 pm

Re: Update Wise Installer exe with Advanced Installer msi

I am new to AI but I think from some of my reading that you might be having a permissions problem and the uninstaller is most likely running at a different user level that your actual windows login,

Hope it helps, but as I said I am new to AI

WarrenB
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Update Wise Installer exe with Advanced Installer msi

Hello,

I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: Update Wise Installer exe with Advanced Installer msi

i actually found a way to get it to work. There's a custom action for Configure MSI with specific ProductCode, it created an install and uninstall CA and i just removed the install one. I found the wise installer msi that gets bundled into the exe. I had to have the msi for the custom action to be created. Adding the CA forces you to pick the msi, but it would be nice if I could've added this custome action by only giving it the Product Code.

Thanks for all the help
Scott
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Update Wise Installer exe with Advanced Installer msi

You're welcome. I'm glad you got this working.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”