Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

How can i install over an existing install ?

At the moment I have an install, under Product Details -> Product Ids , there is currently an id , so when you try to install a new version , it will ask you to first uninstall.

I dont want to do that , I want to install straight over the existing one . Maybe even prompt them that the previous will be uninstalled , do you wish to continue or just uninstall the previous and install the new one.

How can i do this ?
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How can i install over an existing install ?

Hello,

In order to achieve this, all you have to do is:

- increase the version

- change the ProductCode when asked to

This will enable the automatic upgrade option from Windows Installer and your setup will remove the previous version and then install itself.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

Re: How can i install over an existing install ?

At the moment my Version is 25.1.0.100 , so your saying change it to 26.1.0.100 ? and that will automatically uninstall the previous version and install the new one ?

If i want to go back to uninstall first i put the version back to 25.1.0.100 , is that correct ?

Can i give them a prompt that says it will uninstall the old version ?

Also the product code is a Guid , when asked to change do i need to give a new Guid ?, doesnt seem too practical ?

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

Re: How can i install over an existing install ?

Hello Mel,
At the moment my Version is 25.1.0.100 , so your saying change it to 26.1.0.100 ? and that will automatically uninstall the previous version and install the new one ?
Yes, this is how the Windows Installer upgrade works.
If i want to go back to uninstall first i put the version back to 25.1.0.100 , is that correct ?
Not quite sure I understand this question, could you please give me some more details?
Also the product code is a Guid , when asked to change do i need to give a new Guid ?, doesnt seem too practical ?
Yes, you need to do that in order to enable the major upgrade feature.

Updates Deployment: Major Upgrade vs Patch
Can i give them a prompt that says it will uninstall the old version ?
If you'd like, you could use a MessageBox custom action scheduled at the start of your installation.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

Re: How can i install over an existing install ?

At the moment my Version is 25.1.0.100 , so your saying change it to 26.1.0.100 ? and that will automatically uninstall the previous version and install the new one ?
Yes, this is how the Windows Installer upgrade works.

This is OK.


If i want to go back to uninstall first i put the version back to 25.1.0.100 , is that correct ?
Not quite sure I understand this question, could you please give me some more details?

With this what i mean if i want to go back to the old way , uninstall and re-install , do i change the Version back to 25.1.0.100 ?



Also the product code is a Guid , when asked to change do i need to give a new Guid ?, doesnt seem too practical ?
Yes, you need to do that in order to enable the major upgrade feature.

With this i dont get it totally, does the user have to change it ? I wouldnt want them too.
At the moment there is a Guid.. what do i need to do with that ?



Thanks
Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

Re: How can i install over an existing install ?

Another thing is that if someone installs in lets say c:\program files \appfolder and there are some files that I used to delete when they uninstall. Now i am not deleting those files , then the files will remain ?

And if they install in a new folder lets say c:\program files\ testapp how will it detect to uninstall the old and install the new ?
thanks
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How can i install over an existing install ?

Hello Mel,
With this what i mean if i want to go back to the old way , uninstall and re-install , do i change the Version back to 25.1.0.100 ?
Please note that you can not go back to the "old way".
With this i dont get it totally, does the user have to change it ? I wouldnt want them too.
At the moment there is a Guid.. what do i need to do with that ?
Please note that this does not involve the user at all - it is you who whill change the ProductCode when building a new version of your product.
And if they install in a new folder lets say c:\program files\ testapp how will it detect to uninstall the old and install the new ?
Please note that the upgrade process has nothing to do with the installation folder, as the detection is done through the ProductCode and UpgradeCode GUIDS.

Product Identification (ProductCode and UpgradeCode)
The ProductCode property is a unique GUID used to identify your application. This identifier varies from version to version of the same installer.
Unlike the ProductCode, the UpgradeCode is a GUID representing a related set of products. A set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.
The Windows Installer will first search the UpgradeCode and will see that we have a product with X ProductCode installed. It will compare the two ProductCode properties and will see they are different and then will verify the version to make sure it's higher.

Hope things are clearer now!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mel
Posts: 45
Joined: Fri Jul 10, 2020 10:59 am

Re: How can i install over an existing install ?

So to get this right , do i need to change the product id Guid everytime i do a new build , if so do i do it dynamically ? Do i need to assign a new guid on every build ?
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How can i install over an existing install ?

Hello,

If you use the Set Version Command Option and change the version automatically, then the ProductCode should be automatically changed unless the -noprodcode parameter is specified.

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

Return to “Building Installers”