Question

I have a Visual Studio Setup project which has a Application Folder DefaultLocation set to[ProgramFilesFolder][Manufacturer]\[ProductName]. I would like to change this to include the software's version number, like [ProgramFilesFolder][Manufacturer]\[ProductName][Version], but Visual Studio doesn't seem to support it.

Is there an alternative to manually changing the Application Folder's DefaultLocation every time I create a new release?

Was it helpful?

Solution

You can use [ProductVersion] in the same way as [ProductName] and set product's version in the project's properties window.

OTHER TIPS

The way I would do it is create a post-build event, that runs a Javascript program that modifies the MSI. It should be a pretty simple thing.

There's a sample script that modifies an MSI in the answers to the question
How to run an EXE after MSI installation?

That script doesn't do what you want but using Orca and that script, you should be able to figure out how to create your own, that modifies the MSI to insert the version number automatically.

It should be a single db update.

You have [ProgramFilesFolder][Manufacturer]\[ProductName][Version] Try [ProgramFilesFolder][Manufacturer]\[ProductName]\[ProductVersion] In particular, note the slash after [ProductName]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top