sonda
Posts: 101
Joined: Mon Apr 30, 2018 12:01 pm

Two installers in one path

I have two Installers independent that are installing files on same location different files c:\test
What is the right behaviour when i run uninstall, The First installer will delete the folder, and if i run second Installer and star process of uninstall will complain about path location and will stay in add remove programs and i will be unable to remove till i create path. My question is what is right way to resolve this situation, and both installer to be happy. If path is not found just to finis process?

I know that i can left files in folder, but i dont like to left files in folder to be cleared by installers separably. I want when one installer is uninstalled to remove whole content of a folder, but when another is started and see that folder not exist not to complain about? Is that right behaviour?

(situation is this: One installer is main app, another is plugin, if i remove main app i dont want when i click remove plugin to complain that path is missing, also if i uninstall main app, existence of plugin is not needed) Or i can trigger uninstall process of the plugin try the uninstall process of Main app?

Any suggestions are welcomed
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Two installers in one path

Hello,

If the two setups install different files in the same location, e.g.:

Installer A installs a.txt in location C:\test

and

Installer B installs b.txt in location C:\test

then upon removing Installer A, the folder will not be deleted as Installer A does not remove the b.txt file. The Installer A will only remove the folder if it also removes the b.txt file.

I have tested the above scenario and everything worked as expected. Is there something I have missed here?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sonda
Posts: 101
Joined: Mon Apr 30, 2018 12:01 pm

Re: Two installers in one path

Thanks for the answer, the thing is that i explicitly say to main installer to remove folder even if its not empty.

One installer contain main APP another installer contain plugin. If i remove APP i don't want plugin to stay because it can't be used and that the reason why with first installer i say to be removed folder.

But now the problem is when i start uninstall process of the plugin since folder is not present will not be removed from add remove.
I want some how to tell the plugin if folder not exist then just run uninstall process and remove from add remove programs.
So the question is: how to handle this situation
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Two installers in one path

Hello,

If I understand correctly, you want to uninstall the plugin together with the main package (since it can not be used separately).

I can think of two ways in which you can achieve this:

- add the plugin package as a prerequisite for your main package. Then, from the "Prerequisites" page --> your prerequisite --> "Setup Files" tab --> you can use the "Uninstall using this command line" field (this works if your package is created with Advanced Installer).

- through a custom action. At the end of the uninstall process, you can add a custom action that will run the "msiexec /x {your_plugin_product_code}" command which will uninstall your plugin.

Since the uninstall process of the plugin is not possible if the folder is not found (as you have stated), please remove the option "Delete folder even if it's not empty" from your main project, since the uninstall of your plugin will delete the folder.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”