Mohgeroth
Mohgeroth

Reputation: 1627

Can you use use properties as placeholders for shortcut names in a visual studio setup project?

In a visual studio 2015 setup project, I'm using a few property placeholders to dynamically name things.

An example, the DefaultLocation property of the application folder is defined as "[ProgramFilesFolder][Manufacturer][ProductName] v[ProductVersion]". Each of the properties defined in brackets is dynamically converted to the defined value for these properties in the setup project.

Since this application will have multiple versions installed at any given time, the shortcut must also specify the version, for example "My App v1.0.0" and "My App v1.0.1".

I have this configured for other things as well such as registry keys, so I hoped to do this for the shortcut but the link is instead created in the start menu as "My App v[ProductVersion]".

Is it possible to include the version and/or other properties in the name of shortcuts made by the setup project?

Upvotes: 0

Views: 145

Answers (1)

PhilDW
PhilDW

Reputation: 20780

Properties work only for data in the MSI database that is stored as Formatted. Neither Name or Description are "Formatted" in the Shortcut table.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa371847(v=vs.85).aspx

Note that this means it doesn't matter what tool you use - those fields can't be based on a property value.

Upvotes: 0

Related Questions