seraphire
Pilgrim

[QUESTION] How to dynamically add the version to a shortcut (Basic MSI)

Okay, I am a complete newbie here so this may be trivial but I haven't been able to figure out how to do it.

I have been given a request to set the version number in a short-cut for one of our customers. I plan to update the ProductVersion property with the version number. What I would like to do, for this release, would be to add the [ProductVersion] attribute to the DisplayName, but it does not appear to work as intended, instead of displaying:

Launch MyProg.exe 1.2.3

It shows

Launch MyProg.exe [ProductVersion]

What would be the correct way to update the "Display Name" of a short cut without having to manually modify the version number with external code?


I have tried setting the Display Name property on the shortcut to: [FONT=Courier New]LAUNCH~1|Launch [ProductVersion][/FONT] and LAUNCH~1|Launch {ProductVersion} and neither of these work.

If there is a simple way to generate this with a custom action, I am willing to do that, but I would prefer not to as this will be ONLY for 1 of our customers, everyone else will have static text. I have setup a different feature for this customer that will install the icons based on the release, so that part I have figured out.
Labels (1)
0 Kudos
2 Replies
PlinyElder
Flexera beginner

Try LAUNCH~1|Launch "[ProductVersion]"
0 Kudos
seraphire
Pilgrim

PlinyElder wrote:
Try LAUNCH~1|Launch "[ProductVersion]"


Thanks for the suggestion Pliny, it actually made an install that failed completely. I discovered in the documentation:

Short and long file names must not contain the following characters:



  • backward slash (/)
  • question mark (?)
  • vertical bar (|)
  • right angle bracket (>)
  • left angle bracket (<)
  • colon ( : )
  • forward slash (\)
  • asterisk (*)
  • quotation mark (")


which make sense because those are special characters in the environment.
0 Kudos