cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

SUITE is it possible to dynamically create command line for MSI package

I am in the process of testing our setup for network deployment and I am wondering if it is possible to dynamically create the parameters of a command line for a MSI package contained in my installer.

Specifically, I would like to support the inclusion of TRANSFORMS="" for the MSI package if it exists without a user having to use /stage_only to extract the packages.

I know that I can add properties to the command line and pass in values using properties. Those properties get expanded when the package is executed. But I am not certain how to make the jump from a command line option passed in to the suite to modifying the msi package.

Doing this will allow admins with SCCM or SMS to push our our product and include some optional setup parameters on some systems.
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

From the suite's perspective, the command line for the MSI is just a string. You can use suite properties at any point within it and they will be resolved and become part of the command line passed to msiexec.exe. (Actually we pass it to something like MsiInstallProduct, but so long as you limit yourself to PROPERTY=Value pairs, it's close enough.)

As one approach, you could specify a command line that looks like: ALLUSERS=1 [Package1_Transforms] SOMEPROP=SomeValue
and specify the suite property Package1_Transforms as either a blank value (for no transforms), or as something like TRANSFORMS="Transform1.mst;Transform2.mst"

As a second approach, you could do specify a command line like ALLUSERS=1 TRANSFORMS="[Package1_Transforms]" SOMEPROP=SomeValue
and then specify the suite property Package1_Transforms as something like Transform1.mst;Transform2.mst

If the user will be specifying this on the command line, there may be another level of quoting to worry about, so the first case would be slightly harder than the second, as the suite's command line of Package1_Transforms="Transform1.mst;Transform2.mst" will parse off the quotes and then re-apply them in the package's command line, but the first is also much more flexible as it directly supports passing any property.
0 Kudos