Approach for Building a bundle installer

Got a problem you cannot solve? Try here.
Post Reply
KevinTX
Posts: 23
Joined: Thu Aug 05, 2010 10:47 am

Approach for Building a bundle installer

Post by KevinTX »

Hello,

I have installers for several apps, and we'd like to build a bundle installer that will install multiple apps based on users' selection. Here is what I planned to do, I would like to get any feedback to the approach that I am using.

1) create a new bundle installer project (using basic installer template)
2) each of the individual app will be a feature in the bundle installer
3) bundle installer installs the setup file for the individual app to MYTEMPDIR
4) for each selected feature, bundle installer invokes the individual installer in MYTEMPDIR in silent mode
5) remove the temporary individual installers from MYTEMPDIR
6) remove the registry entry for the bundle installer (so that it does not appear in the Add/Remove Program list), since it is not desirable to allow users to uninstall the whole bundle (they can still uninstall each individual feature one-by-one).

For CD distribution, it seems that it is not necessary to install the setup files to a temporary directory, since they can be included in the CD and the bundle installer can just invoke the individual installer from the CD. But the bundle installer is needed for both CD distribution and Web distribution, I am not sure that my approach would work well for CD distribution. Do I need to create another project just for CD distribution?

Thanks for any feedback and suggestion.

Regards,
Kevin
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Approach for Building a bundle installer

Post by mills »

There's a few things to consider here.

Your options are basically:
Create a single (web-based) installer for both web and CD distributions.
Create a web-based installer for web distro and an uncompressed installer for CD distro.
Create a web-based installer for web distro and a custom uncompressed installer for CD distro.

I don't think the first option is the best idea (it will be pretty slow running off the CD).

I think your best bet will be the second option (of copying the installers to a temp directory on the hard drive) with a slight performance improvement over installing straight off of the CD (since the installers will probably need to decompress and this could take longer to go from CD to HDD than it would if they were already on the HDD and decompressed there).
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Approach for Building a bundle installer

Post by alibaba »

What about this:

1) create a new bundle installer project (using basic installer template)
2) each of the individual app will be a check box in the bundle installer
3) bundle installer copies the setup file for the individual app to MYTEMPDIR
4) for each selected setup, bundle installer invokes the individual installer in MYTEMPDIR in silent mode
5) remove the temporary individual installers from MYTEMPDIR
6) avoid apply install command then you have not to delete the reg key
KevinTX
Posts: 23
Joined: Thu Aug 05, 2010 10:47 am

Re: Approach for Building a bundle installer

Post by KevinTX »

Thanks for the suggestion. I have a question about the step 6). Is it possible to avoid APPLY INSTALL command? I thought that in step 3) we'll have to install the individual setup file to MYTEMPDIR. My understanding is that those pink INSTALL command are not run until APPLY INSTALL command is called.
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Re: Approach for Building a bundle installer

Post by CFConner »

No (speaking from experience from one who already has a bundled installer): You will call your installers using either the MSI plugin or the Run Program (msiexec etc).

Just remove the apply install in your MAIN mpr file at the bottom.

It is the TEAL color commands that will not execute without an apply install - such as writing a registry key - but I don't do that with my bundled installer so it works just fine.

=-Chris
KevinTX
Posts: 23
Joined: Thu Aug 05, 2010 10:47 am

Re: Approach for Building a bundle installer

Post by KevinTX »

Thanks for the reply.

I tried commenting out the APPLY INSTALL from my bundle installer, it stopped working because the setup exe files for the individual products are not installed to MYTEMPDIR.

I am wondering how do you copy or install the msiexec files to the target machine without calling APPLY INSTALL? Maybe, you are not using INSTALL command to copy/install them?
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Re: Approach for Building a bundle installer

Post by CFConner »

Ah, I see what you are doing.

Are you using file bags for your sub instllations? (I do - as they are defined as web media blocks). In any case, you need to use the variable that the files are unpacked at.

Let's look at an example - in your setup script for this particular component (to make life sweet - be sure you have a script block for each sub installation):

Code: Select all

 Define File Bag : #IADIR#\runtimes\Clients\*.*, get runtime location of files into variable CLIENTFILES
Now, later in the script block for my setup I do this:

(I happen to use Run Program)

Code: Select all

Set Variable CMDEXECUTION to /i "$CLIENTFILES$Clients.msi" $TRANSFORMSWITCH$ /log c:\ClientInstall.log
(Don't write to the root of the C: drive - you should use %temp%MyFile.log (bad coder bad coder! :) )

Then my call to Run Program:

Code: Select all

 Run Program msiexec.exe $CMDEXECUTION$ (WAIT, get result into variable CLIENTINSTALL)
I hope this helps you out.

=-Chris
KevinTX
Posts: 23
Joined: Thu Aug 05, 2010 10:47 am

Re: Approach for Building a bundle installer

Post by KevinTX »

Thank you for your reply and example. Now it makes sense to me. I am an IA newbie, this is the first time that I heard of File Bag. I'll try the technique in my bundle installer.

Thanks again,
Kevin
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Approach for Building a bundle installer

Post by alibaba »

I mean you should not install the bundeled packages but just copy it by using kernel32.copyfile function by calling the kernel32.dll (copy your setups from $SUPPORTDIR$<your setup> to <yourtempdir>, add the setups to creatives before :wink: ). And afterwards call kernel32.deletefile to remove the setups from tempdir. Then use run program and start your installer. So you have no purple commands and you don't need ApplyInstall.
BTW we use a delphi application as frame for installation of more setups, so it is just my theory.
KevinTX
Posts: 23
Joined: Thu Aug 05, 2010 10:47 am

Re: Approach for Building a bundle installer

Post by KevinTX »

In this case, why bother to copy them from $SUPPORTDIR$ to target temp dir? Why not just invoke the setup files directly (Run Program $SUPPORTDIR$<myApp_setup.exe>) ?
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Approach for Building a bundle installer

Post by mills »

$SUPPORTDIR$ wouldn't be a bad idea. It should appear on the hard drive, in a temp directory, even if you're installing from a CD.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Approach for Building a bundle installer

Post by alibaba »

Why not just invoke the setup files directly
Yes of course, it would be easier, I was caught in your example a bit.
Post Reply