narasimhakashyap
Posts: 16
Joined: Thu Dec 27, 2012 3:36 pm

Build a setup file with previous version number

Hello,

I have a version of my application installed on the client machine. Now I want to build a setup project with the same version number and include new files to be installed onto client's machine. Is it possible for us to build a setup project which will not ask for "Repair", "Modify" or "Remove" option which has the same version number as the previous one?

Thanks in advance.
Narasimha Kashyap
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Build a setup file with previous version number

Hello Narasimha Kashyap,

Please note that when the version is changed and it is choosing a “major upgrade”, a new “Product Code ” is generated. You can take a look on the Changing Version article which may be useful to you.

So, you can go in the “Product Details” page and in the Product Ids tab you can generate a new “Product code”. Because you have the same version for your applications, the old application will not be uninstalled. So, you will have two entries in the “Control Panel – list”. In order to avoid this you can go in the “Custom Actions” page and add the Uninstall previous versions predefined custom action with sequence.

Also note that this is not the recommended approach, it doesn't obey the “Windows Installer best practices”. So, can you please tell us why you want to use this scenario?

The recommended approach in this case is to change the version from the “Product Details” page and choose the “major upgrade” option. This way a new “Product Code” will be generated and also the previos version will be automatically uninstalled.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
narasimhakashyap
Posts: 16
Joined: Thu Dec 27, 2012 3:36 pm

Re: Build a setup file with previous version number

Thank you Dan for your valued reply.
can you please tell us why you want to use this scenario
All I want to do is add some more files to the Installed folder without disturbing the previously installed files/folders. Since I don't want to delete previously installed files/folders, I'm trying to use the same build version as that of previous version. Let me know if this can be achieved.

Thanks in advance.
Narasimha Kashyap
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Build a setup file with previous version number

Hi Narasimha Kashyap,

The desired behavior can be achieved through a patch. Please take a look on the Patch Authoring article for a better understanding of how does it works.

Also keep in mind that a patch only contains the difference between the old version and the new version of your application and also your application is not uninstalled when a patch is installed.
Please note that this can be achieved with the “Updater” functionality.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
narasimhakashyap
Posts: 16
Joined: Thu Dec 27, 2012 3:36 pm

Re: Build a setup file with previous version number

I'll tell you the whole scenario what I want to do.

I have a project which has 3 sub modules which a customer can purchase individually(in any order). There are no major changes in the files that are installed but the changes are in database. So, I want to run SQL script files if the product with the same version number is installed previously without touching the previously installed files. So, I want to create three different setup projects with same the exes and dlls, but different script files. Please help me in achieving this.

Thanks in advance.
Narasimha Kashyap
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Build a setup file with previous version number

Hi Narasimha,

Please note that what you want to do is to totally against Microsoft recommendations.

However, want you want can be done like this. Go to Product Details page and disable the option "Register with Windows Installer".
Please note that this will make your package to no longer appears in Control Panel, list of installed programs.

Now, you can copy the same aip file and create two more identical projects, each containing the common files and the particular
(per-component) files. Then in SQL Scripts page, you can add the scripts you want to execute for each page.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”