icke_qps
Posts: 15
Joined: Thu Apr 25, 2019 10:26 am

Setting the MSI version in the shortcut text of an MSM component

Hi!
I am trying to achieve the following scenario:
* my MSI has a version number
* my MSM contains an executable and a desktop shortcut to this executable
* I want the shortcut to contain the version from the MSI

So what I have got so far is this:
* the MSI project has a Property: "Version" with Value: "9.0"
* the MSM has a Property: "VERSION" with Value "0.0"
* the MSM has an inline script: Session.Property("VERSION.72125CE3_35E2_48CE_BE19_F871576EE1AE") = Session.Property("Version")
* the shortcut in the MSM has a Name: "MyProduct [|VERSION]"

I do actually see in the log that the VERSION property is set, but the shortcut is still named "MyProduct 0.0".

Do you have any suggestions on how to approach this?
Kind regards,
Peter
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting the MSI version in the shortcut text of an MSM component

Hi Peter,

I'm afraid that the name of a shortcut cannot be changed based on a property that is updated at install-time. Please take a look on the "Change the name of a shortcut depending on property" thread which debates the same problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
icke_qps
Posts: 15
Joined: Thu Apr 25, 2019 10:26 am

Re: Setting the MSI version in the shortcut text of an MSM component

Hi Eusebiu,

thanks again for your quick and clear response.

I just changed my scripts to also set the VERSION property, which works right away!

Is there also a way to use the MSM Version property? I didn't see it in the list.

Best regards,
Peter
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting the MSI version in the shortcut text of an MSM component

Hi Peter,

I'm afraid that I do not fully understand your question. Can you please give me more details?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
icke_qps
Posts: 15
Joined: Thu Apr 25, 2019 10:26 am

Re: Setting the MSI version in the shortcut text of an MSM component

Hi Eusebiu,

I could've explained this somewhat better :roll:

I tried to use the Module Version from the MSM:
version.png
version.png (33.69 KiB) Viewed 11674 times
in the Shortcut text, but the 'Module Version' is not available there:
properties.png
properties.png (102.78 KiB) Viewed 11674 times
That way I wouldn't have to add another property, as it is already available.
Best regards,

Peter
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting the MSI version in the shortcut text of an MSM component

Hi Peter,

I'm afraid that the merge module version is not stored in a property, so the only way to get it is through a custom action as discussed on the "How To Get Merge Module's Version Into A Global Property" thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
icke_qps
Posts: 15
Joined: Thu Apr 25, 2019 10:26 am

Re: Setting the MSI version in the shortcut text of an MSM component

Hi,

That works for me, thanks!

Best regards,
Peter
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting the MSI version in the shortcut text of an MSM component

You're welcome Peter. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”