How to display build number automatically
Posted 21 December 2012 - 19:56
I did it with my old Wise install by having the nightly build create/edit a file with the build number in it. Then the Wise install would read the number and place it in the dialog. I don't know how to do that with a Basic MSI.
If there was some way that InstallShield could read the File Version of my executable to be installed, that would be another way to get the build number.
Any help greatly appreciated.
Posted 26 December 2012 - 12:10
This setup will install [ProductName] version [ProductVersion].
Does that help?
Posted 03 January 2013 - 00:46
With the Wise install, I had the automatic builder write the build number to a file to be installed (of course the file was deleted before the installation was finished.) During the install, my setup.exe would read the file and display the number in the Welcome dialog.
My boss wants to know why can't I display the build number with installs created by InstallShield. I could, of course, just by checking at the end of every day whether anyone has edited and checked in any files. If they have, then I bump the build number display in the Welcome dialog and all is well. But what if I'm out, or I miss somebody's edit, or they edit after I left, or I forget? Then the build number displayed in the install isn't correct. Better to do it automatically if possible. Any ideas appreciated.
Posted 03 January 2013 - 17:01
ISCmdBld.exe -y "1.2.3"
You can also set any other property on the command line using the -z parameter.
If you prefer your existing method with the file, please explain how you did it with Wise. I guess you used a custom action to read the file content?
Note that setting the ProductVersion property during build instead of reading the information from a file at setup runtime has the advantage that your version number is also correctly displayed in the Add/Remove Programs (or Programs and Features) control panel.
Posted 03 January 2013 - 20:00
One curiousity: Our version number is 2.701. But the "701" cannot be edited in the IDE because the first two numbers must be less than 256. On the other hand, using your command-line method of determining the value of the Product Number greater than 255 is accepted. I wonder why the IDE has the 255 limit?
Posted 04 January 2013 - 15:19
So 2.701.0 is not allowed. Apparently the command line builder doesn't catch this error, but a validation would probably flag it.
You may want to change the ProductVersion property to something line 2.70.01 or 2.0.701. For display purposes on your installer dialogs you can use a custom property (e.g. ProductVersionForDisplay or StringProductVersion or something like that) that doesn't have these restrictions.