开发者

Adding version number to Application Folder in Visual Studio Setup project

开发者 https://www.devze.com 2022-12-10 18:24 出处:网络
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 vers

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?


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


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]

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号