We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

merlinuk
Posts: 5
Joined: Mon Jan 19, 2015 11:14 pm

Option Uninstall a package with the same version (if found)

I've got this option enabled and so a user can if he wants reinstall the same version. But he can I know this has happened when the main installs starts?

Is there any property etc. I can use in a condition to know this has happened?

Thanks
-Ron
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Option Uninstall a package with the same version (if fou

Hi Ron,

When the Uninstall a package with the same version (if found) option is enabled then if a package with the same product code and version as the current package is already installed, enabling this option will uninstall it.

If you run the same installation package for the second time then Windows Installer will run the installer in maintenance mode and the user will then be presented with choices to alter the installed product, repair it or remove it (done through the MaintenanceTypeDlg). This is happening because the installation package has the same PackageCode GUID. A new PackageCode is generated each time you build your project. Think of the PackageCode as some sort of checksum. No two .msi files should ever have the same PackageCode unless they are identical.

Please take a closer look on the Product Identification article.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
merlinuk
Posts: 5
Joined: Mon Jan 19, 2015 11:14 pm

Re: Option Uninstall a package with the same version (if fou

Hi Dan,

Thanks for the info... but unfortunately it did not happy me at all.

But the good news is that I've found a solution for both of my problems! It was simple I just used a custom action of "Execute inline script code" and wrote some vbs code to do what I want to do at the places within the sequence I want!

:-)

But thanks for you help anyway Dan!
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Option Uninstall a package with the same version (if fou

Hi Ron,

I'm glad you got this working.
By the way, you may want to take a look on the predefined Uninstall previous versions custom action.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”