struggling with creating MSI installs by hand I wonder if it is possible with Advanced Installer to create installs in an ANT build that will take the version number each time from an external file. It should also modify the MSI product code so an update installation is triggered on the target system. Is something like this possible with Advanced Installer?
Yes, this can be done in the command line interface by using the "-fromfile" parameter for the /SetVersion command. If the "-noprodcode" parameter is not used, a new Product Code is automatically generated.
Wow, that was fast! And I have not even purchased your product yet Can this be tested with the freeware version too? Purchase would take a little longer to evaluate here at the company.
I use the /SetVersion on a copy of the original project file and do not use the -noprodcode parameter (of which I was not aware). However a grep of the original and modified copy show the ProductCode as identical. So I am puzzled!!
I use the /SetVersion in conjunction with /Edit and so maybe this is the difference. I do want to keep the ProductCode the same as checked in because I use this for tracking purposes.
I am using version 6.9.1.
I started using this technique (edit a copy) because the project is under source control and normally read-only.
Please note that a copy of the AIP file will use the same Product Code as the original. I'm not sure why the Product Code was not changed for you, but you can try increasing one of the first three fields of the version through the "/SetVersion" command (without the -noprodcode parameter).
Sorry it took me so long to respond. here is the sequence of commands I used in a batch build (following the copy). The VUF is set in the script and the BuildNumber is generated - the changenumber from our Perforce source control.
I think I know the reason. Although I use /SetVersion, I am actually not changing it. Each time we have a new VUF, I make the change in source control. So the /SetVersion in the script is actually redundant. The important parameter is the buildnumber, which identifies the full V.U.F.B
I don't know why anyone would actually feel the need to change the first three parts - the V.U.F - on each build. The V.U.F is how we identify the release version we are working on. I thought this was standard practice. The BuildNumber tells us where we are in the development of the release. In the case of Perforce, the buildnumber increases "forever" as it is really a timestamp. When it exceeds a 16 bit unsigned integer, as ours has, it can't be used in certain places in the version resource files. So for those cases, we store the the BuildNumber.
Indeed, using the "/SetVersion" command with the existing version does nothing to the project. A new ProductCode is generated only if the version is changed. A workaround would be to call the command twice: once to set a new version (for example 1.0.0) and a second time to set it to the current version. This would change the Product Code and keep the current version.