Chips
Posts: 7
Joined: Wed Oct 02, 2024 1:50 pm

Powershell script running on update on first instance

Hello,

I have an installer that uses multiple instances with the "Generate instances at install time" option. I also have a script that I want to run only during the first installation of an instance.

Currently, my script includes the condition NOT OLDPRODUCTS, which works as expected when upgrading other instances. However, when I upgrade the first installed instance, the script runs, which is not what I intended.

Could you help me understand why this happens and how to prevent the script from running during upgrades of the first instance?

Best regards,
Rafael Marques
Catalin
Posts: 7037
Joined: Wed Jun 13, 2018 7:49 am

Re: Powershell script running on update on first instance

Hello Rafael,

Could you please give me a test-case so I can try and reproduce this on my end as well, because I have tested this and wasn't quite able to do so.

Here's what I've done:

- installed v1

- launch the setup again, install one instance

- change version to 2.0.0

- install the new version -> over both original and the instance

In both cases, the powershell script was not executed when the condition was "NOT OLDPRODUCTS".

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

Return to “Building Installers”