How to avoid all files getting installed in a system - Advanced Installer Community
sj73739
Posts: 5
Joined: Wed Dec 03, 2014 12:17 pm

How to avoid all files getting installed in a system

Hi,

We have ABC.msi which is already installed locally and we have done few configuration changes in some files to run a test case. Suppose that, as part of some change request someone modified two files and checked in those files, included in build and packaging is also done. During installation of newly built msi, is it possible to install only those modified files without allowing complete installation(msi should only install those 2 files that got checked in and it shouldn’t modify/install rest of the files).
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi and welcome to Advanced Installer forums.

In order to achieve this you can go in the "Media" page, turn your package to an EXE type and select the "Install MSI as minor upgrade (if applicable)" option ( the package cannot be an MSI in this case). You can see this option in the image below.

Otherwise, you can create a patch between the older and newer versions of your application as described in the "Authoring a Windows Installer patch" tutorial.

Best regards,
Eusebiu
Attachments
Install as minor upgrade.png
Install as minor upgrade.png (67.9 KiB) Viewed 8957 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sj73739
Posts: 5
Joined: Wed Dec 03, 2014 12:17 pm

Re: How to avoid all files getting installed in a system

Hi Eusebiu,

Thanks for your update.

I have a question for you. As per your suggestion, I have done build by selecting "Patch" option. Suppose that I am end user who is going to install msi for the first time. In that case what will be the behavior of my msi?

Regards,
Sravan
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi Sravan,

If you created a patch as described in the tutorial I suggested, then a MSP file is created instead of a MSI file. So, when that file is sent to a user that does not have your application installed, he will not be able to install it, an error message will be displayed. He needs to install the MSI file first.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sj73739
Posts: 5
Joined: Wed Dec 03, 2014 12:17 pm

Re: How to avoid all files getting installed in a system

Hi Eusebiu,

Thanks for your update. After generating exe by following your steps i am facing another issue.

Suppose that i have installed ABC.msi(1.0.1) on Dec 1st and done some changes in some of the files locally and later i have installed latest built msi(1.0.2) my local changes are gone with latest installation.

Can you please help me out how to avoiding above scenario?

My requirement is to install only those files that are modified with latest installer and not to remove/over-ride/un-install locally modified files.

Regards,
Sravan
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi Sravan,

Do you mean that all the files are removed and replaced by the new version when you use the "Install MSI as minor upgrade (if applicable)" option? Please note that all the Patch Rules should be respected when that option is used.

Also, if you want to preserve some files during the upgrade, you can read the instructions from the "How do I prevent a file or registry entry from being uninstalled or repaired" article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sj73739
Posts: 5
Joined: Wed Dec 03, 2014 12:17 pm

Re: How to avoid all files getting installed in a system

Hi,

I think we have followed all Patch rules. Please find the attached aip file created after incorporating your suggested settings. But i see that my local changes are getting lost after installing latest built msi(1.0.2).

Can you please let us know if it is possible to take the backup of APPDIR(1.0.1) before installing latest built msi(1.0.2)?

Best Regards,
Sravan.
Attachments
CyberCSR.aip
AIP file after adding your changes
(160.34 KiB) Downloaded 395 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi Sravan,

I tried to open your AIP file but it seems to be corrupted. Can you attach the correct file again? Also, in order to verify the patch rules, I need the older version of the AIP file, too. A verbose log of the upgrade will also be helpful.
Can you please let us know if it is possible to take the backup of APPDIR(1.0.1) before installing latest built msi(1.0.2)?
In order to take a backup, you can create a custom action with this functionality because there is no predefined support for this.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sj73739
Posts: 5
Joined: Wed Dec 03, 2014 12:17 pm

Re: How to avoid all files getting installed in a system

Hi Eusebiu,

Sorry for the inconvenience.

Attached are the files which we use to generate both the versions.
Attachments
AIP_File_Old.txt
AIP file which we use to generate 1.0.1
(154.79 KiB) Downloaded 347 times
AIP file.txt
AIP file which we use to generate 1.0.2
(160.34 KiB) Downloaded 366 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi Sravan,

I noticed that you have different Product Codes for your versions, but one of the rules if for them to be identical in both versions. Can you set in the newer version, the same Product Code as in the older version and test them again?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
karlh
Posts: 6
Joined: Tue Jan 20, 2015 10:16 am

Re: How to avoid all files getting installed in a system

Hello,

I read this thread, but I can not get minor upgrade working. I am using AI 11.7.1 Professional so I can not use the patch (.MSP) approach as this requires the Enterprise edition, right? I created a simple test project which contains a few files. I copied the project, changed Product version from 4.2.2 to 4.2.3, chose Patch in the Update Method dialog (verified that Product ID remained the same), modified one text file (i.e. changed its content) assigned to the Resources section ensuring that the file's Component GUID (in the Organization section) remained unchanged, removed all other files (because they are the same as in version 4.2.2 and therefore do not need upgraded). Then in the Media section I checked "Install MSI as minor upgrade (if applicable)". Other settings in Media for both the projects are: Single EXE setup, same MSI name and EXE name, Archive installation files into CAB files, Compress CAB files..., One CAB archive per feature, same Extract location, Do not delete extracted MSI and CAB files.

Should my approach work or am I missing something? Because, after installing 4.2.2, trying to install 4.2.3 does a) not bring up a user-interface for upgrading (I read in another thread that you might implement this in a future AI update) and b) not install the one updated text file. However, the Product version in the Windows Registry was updated to 4.2.3.

Thanks, Karl
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi Karl and welcome to Advanced Installer forums.
Should my approach work or am I missing something?
Please keep in mind that one of the Patch Rules is to not remove any component/file from the newer version. The new package will contain all the files, but it will install only the modified ones.
a) not bring up a user-interface for upgrading (I read in another thread that you might implement this in a future AI update)
Indeed, that feature was not implemented yet, it is still ou our TODO list.
b) not install the one updated text file.
This happens because of the broken patch rule mentioned above. In this case, the package is installed as a major upgrade, not as a patch. So, the old version is uninstalled, and the new one (that contains only one file) is installed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
karlh
Posts: 6
Joined: Tue Jan 20, 2015 10:16 am

Re: How to avoid all files getting installed in a system

Hi Eusebiu,

Thank you for your answer.

If the new package contains all the files, the package will be as large as the old package (imagine the old package has hundreds of MB and the upgrade affects only one file of a few kB). I would like to allow the user to download just a small package to perform a minor upgrade. How can I achieve this?

Kind regards,
Karl
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to avoid all files getting installed in a system

Hi Karl,

I'm afraid that this can be achieved only through the "Patch" feature which is included in the "Enterprise" edition of Advanced Installer.

You can also create an "unconventional" patch, meaning that you can create a new project that contains only the files that were modified, searches for the path of the previously installed version and install the new files overwriting the old ones. Also, you can uncheck the "Register product with Windows Installer" option from the "Product Details" page.

You can see more details in the Patch to replace 2 files thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”