mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

EXE Bootstrapper and Transforms

I have been playing with simple mst transforms for the purposes of multi-instance package installation....and have successfully built an AI project that I could install manually with msiexec as a second instance. (Basically transforming the ProductCode).

I realise that AI doesn't yet support using such transforms (hint, hint) in a more elegant fashion, but I can probably live with this if I can at least make it a little simpler for the end-user.

If I build an EXE bootstrapper for the package:

(a) Can I pass through as a command-line argument to the exe, being say the instance number, and have this map to the transform name on the command line to msiexec?
(b) How can I include the transform files inside the exe? This seems to be not that different to bundling prereq software packages in the exe?
(c) Perhaps there is a way to trick AI into doing what I want using 'language selection ' as the mechanism to select a transform from the bootstrap GUI?


Also, I'm not yet sure how you apply a patch to a package that has been transformed into a second instance. Clearly when the patch is applied via msiexec the correct product code must also be specified, but would the patch itself have to be authored to understand the alternate product codes? Or is the transform somehow used on the command line when the patch is applied?

Thanks,
MT
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: EXE Bootstrapper and Transforms

Hi,
I realise that AI doesn't yet support using such transforms (hint, hint) in a more elegant fashion
We have this feature on our TODO list and it will be available in a future version of Advanced Installer.
Can I pass through as a command-line argument to the exe, being say the instance number, and have this map to the transform name on the command line to msiexec?
I'm afraid that this is not supported by the EXE bootstrapper. It can pass to the MSI only standard msiexec commands. Therefore you need to specify the actual transform you want to use through the TRANSFORMS property.
How can I include the transform files inside the exe?
Unfortunately this is not supported by the EXE bootstrapper.
Perhaps there is a way to trick AI into doing what I want using 'language selection ' as the mechanism to select a transform from the bootstrap GUI?
I'm afraid that this is not supported by the EXE bootstrapper and it could be done only by modifying its code.
I'm not yet sure how you apply a patch to a package that has been transformed into a second instance.
This can be done by following these steps:
- copy the original package and its transform into a separate folder
- use Orca to apply the transform to the MSI
- copy the upgraded package and its transform into a separate folder
- use "Orca" to apply the transform to the MSI
- create a patch which uses these MSI files as the target and upgraded images

Please note that after the transforms are applied to the MSI files, they still need to meet the patch rules. Therefore, the transforms of the original and upgraded packages must be similar (they must use the same Product Code, same GUIDs for components etc.).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Re: EXE Bootstrapper and Transforms

Hi Cosmin,

Thanks for the detailed reply...it looks like I'll have to stick with installing secondary instances manually. SO be it, I can live with that for now.

Re my question about applying patches to secondary instance installations, I found some more stuff on msdn. From what I can see, so long as the patch file contains all the product codes used for all the target instances, then it's just a matter of applying the patch to the instance specifying the target productid to msiexec. I'm assuming that patch will then leave the ProductCode unchanged from whatever it was for the instance.

If this works, this seems simpler than generating separate patches from each target-upgrade pair as you propose? I certainly don't want to have to generate a separate patch for each instance...that' would be a nightmare...

Cheers,
MT

Return to “Common Problems”