keinagae
Posts: 3
Joined: Tue May 02, 2023 6:20 pm

Taking actions during uninstall based on actions taken during installation process

Tue May 02, 2023 6:28 pm

I have a project that needs postgres installed during the installation process.
I am able to install postgress in silent mode during installation and I also use a checkbox to allow the user to install postgres or use existing one.

But now I want to check during uninstallation process that if user installed postgres when he was installing the application then postgres also gets uninstalled. How can I check for the actions the user took during install time when the application is being installed. Or can you tell me of some alternate for this. also can I create dialogues for uninstall process only?

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Taking actions during uninstall based on actions taken during installation process

Thu May 04, 2023 3:14 pm

Hello and welcome to our forums,
How can I check for the actions the user took during install time when the application is being installed.
You can achieve this by setting a registry entry in the "Registry" page, based on the checkbox result.

For example, if your CheckBox control is checked, then it means the user wanted to install Postgresql and therefore we write in the registry that.

Upon uninstall, we can perform a search for that registry key and, if we find it, it means that the user has chosen to install Postgresql during installation.
also can I create dialogues for uninstall process only?
Yes, you can do that by creating the dialogs under "Maintenance" in the "Dialogs" page:
Screenshot_115.png
Screenshot_115.png (16.74KiB)Viewed 11913 times
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

keinagae
Posts: 3
Joined: Tue May 02, 2023 6:20 pm

Re: Taking actions during uninstall based on actions taken during installation process

Thu May 04, 2023 3:33 pm

Thanks for reply it was helpful also can you also let me know how can I find the installation path for postgres I want to do it in silent mode. For that I need its installation path

keinagae
Posts: 3
Joined: Tue May 02, 2023 6:20 pm

Re: Taking actions during uninstall based on actions taken during installation process

Thu May 04, 2023 7:36 pm

Also will it be possible if I want to show user a dialogue at uninstall that will ask user that if they want to remove postgres only if they installed it via my installer during install time. So in short how can I show a dialog conditionally during uninstall time

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Taking actions during uninstall based on actions taken during installation process

Mon May 08, 2023 1:30 pm

Hello,

I am glad my answer was helpful!
Thanks for reply it was helpful also can you also let me know how can I find the installation path for postgres I want to do it in silent mode. For that I need its installation path
Not quite sure I fully understand this.

Would you like to get the path of Postgres after its installation?

If that's the case, most likely, we would need a custom script that looks for the path - this path can be stored, most likely, in the registry.

For what would you need this path?
Also will it be possible if I want to show user a dialogue at uninstall that will ask user that if they want to remove postgres only if they installed it via my installer during install time. So in short how can I show a dialog conditionally during uninstall time
For this, you can simply add the dialog and then right click on it --> "Show only if" and input your condition there.

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

Return to “Building Installers”