Change Program Name and Shortcut Title during installation

后端 未结 2 1061
南方客
南方客 2020-12-21 15:54

I have a Basic MSI Install with Install Shield 2013 and we have about 20 different affiliate releases. Really the only difference between these releases is the Program Name

相关标签:
2条回答
  • 2020-12-21 16:47

    I think I would just use a transform for this, since the changes are so minimal. Transforms are used for adding multi-language support to an MSI, so this should certainly be easier with just a couple of changes to the parent database.

    You create your own setup.exe launcher (there are many templates available - I think even Installshield has one you can use). The setup.exe asks for the affiliate code and then applies the appropriate transform (or the default one) and kicks off the install. This would be the recommended approach.

    You can even merge the transforms as a build step and spit out as many "transformed" MSI files as you need. Then there is less "clunk" in the launching, but it sounds like you need to switch behavior based on the affiliate code, and then your setup.exe would be effective since it can contain the logic necessary to chose the transform to apply depending on the user input.

    If you are not familiar with a transform, it is essentially like a little "transaction" or a database fragment that is applied to your MSI adding, replacing and / or updating rows with new data. You can create one via any MSI tool, including Orca from the Windows SDK.

    Transforms are applied at the command line for msiexec.exe. Here is a sample command line with truncated paths for illustration. This is silent installation, with verbose log and two transforms applied (one is the language transform):

    msiexec.exe /I "IsWiX.msi" /QN /L*V "C:\msilog.log" TRANSFORMS="C:\IsWix.mst;C:\1031.mst"

    Here is a sample transform applied to a parent database: enter image description here

    0 讨论(0)
  • 2020-12-21 16:59

    The Shortcut tables doesn't allow for formatted shortcut names. I know how to implement variation points three ways:

    1) Build Time 2) Install Time 3) Runtime

    You're question indicates you want to go from build time to install time. It's possible to do this using custom actions that manipulate the Shortcut table using temporary rows.

    The way I'd do it is have a custom table with schema Affiliate Code [PK] Branding

    The custom action would get the prompted or passed value and find the row in the table for branding data. Then emit the data into the shortcut table and let MSI handle the rest.

    0 讨论(0)
提交回复
热议问题