Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Setup Project: Uninstall other component on install

I am creating a Visual Studio Setup project. I want to un-install another component from the system from the install of my component. The other component is installed from my own setup created using Visual Studio.

Currently when I am calling the un-install of the other component from the install action of the component I get the error code: 1618 (another MSI already running).

Could anyone suggest me an alternative way to solve this problem?

like image 870
Ramesh Soni Avatar asked Oct 13 '08 12:10

Ramesh Soni


2 Answers

If you don't need to actually run the uninstall of the other component, you could use a Custom Action to remove files/folders you intend to replace.

Using a Custom Action will force you to do all the clean up actions the Uninstaller would do for you.

Is it that you're replacing something or are you just trying to uninstall something as a result of installing something entirely different?

MSDN Custom Action Walkthrough

I have also read a few articles from Phil Wilson that have been helpful with Custom Actions:
Phil Wilson on Custom Actions

like image 151
PersistenceOfVision Avatar answered Sep 18 '22 13:09

PersistenceOfVision


I ran into a similar problem that required several installs to run together and could find no way to run MsiExec recursively. The solution I used was to bundle the installer with a script that would run MsiExec once to install/uninstall the old package, then again to run the new installer. Clients had to run the script to install.

If you find a better way, let me know.

like image 33
Dour High Arch Avatar answered Sep 18 '22 13:09

Dour High Arch