jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

Replace a CAB file in an AI generated MSI without using AI?

Thu Mar 18, 2010 1:07 am

I have some users who send groups of Excel workbooks and Word documents to each other by zipping them up and then emailing / posting them as attachments.

They have a convention in place where they unzip the received files to an agreed upon location on their hard drives. This location has a standardized folder structure that matches the sender's.

The problem is that users often choose the wrong target folder to unzip to. This happens for a variety of reasons. The result is that they end up using Windows explorer to "undo" the effects of unzipping a bunch of documents to the wrong folder. This gives them the opportunity to erase the wrong files and folders, as it easy to become confused when folder structures and their contents are duplicated at different levels. This causes fear and loathing amongst normally very laid-back people!

I would like to use Advanced installer to create a template MSI file (the end result must be a single file) that contains a CAB file that can be replaced/updated later without using Advanced Installer. When this updated MSI is run, it would install the files contained in the updated cab instead of the files contained in the cab when the template MSI was first built with Advanced Installer.

Instead of running their zip program to package up the files they want to send to each other, they would run a program that I developed to package up files into a CAB. I would then extend this program so that it could take the CAB file it generates and merge it into the template MSI file. The user would then send this msi file to their colleagues who would run it on their machines to have the files copied to the correct location (as I would embed that in the MSI as well).

I would set the template MSI to not register with windows installer on the target machine so there would be no need to deal with Add/Remove Programs in the user's Control Panel.

If all sorts of work needs to be done to update all of the file and folder details of the cab so the msi will install them instead, I suppose I could include my own de-cabbing program and run it as a custom action in the msi.

How can I use Advanced Installer to create a template MSI file that contains a CAB (with a folder structure) and can be replaced after I build it with Advanced Installer, using a program that I developed? The contents of the CAB file and its folder structure can vary each time a users runs it.

I suspect that I am trying to reinvent a wheel here.

Any suggestions or links to relative discussions / solutions would be appreciated.

Thanks.

GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact:  Website

Re: Replace a CAB file in an AI generated MSI without using AI?

Thu Mar 18, 2010 11:21 am

Hello,

I am afraid this behavior is not supported by Advanced Installer.
The typical approach taken when content installed by a project changes often is installing from an external folder.
You can check out this thread for more details about the approach:
http://www.advancedinstaller.com/forums ... DIR#p28180

You can adapt this approach to install the cab content instead of installing the folder content. You would of course need a custom action to extract the cab first. It's complicated, but it should be doable.
Since your users are already exchanging a single file and unziping it, they would instead zip/unzip the installer and it's external cab and then install it.

I am not aware of a solution that would enable you to replace the cab inside an .msi, short of creating your own tool.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”