cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nbmont
Level 3

Setting ProductVersion on an InstallScript project from MSBuild.

Hi,

I'm trying to set up a Team Foundation Server build that ultimately creates an installer with the appropriate version. I'm having trouble getting InstallShield to recognize the version that I'm passing in. I'm doing something like this:




PATH_TO_DEBUG_FILES








ReleaseConfiguration="Release"
PathVariables="@(InstallShieldPathVars)"
OutDir="$(BinariesRoot)\Win32"
ProductVersion="3.4.5"
InstallShieldPath="$(InstallShieldPath)" />


Everything I'm passing in (path variables, output directory, configuration, etc..) works fine except for ProductVersion. No matter what I put there, my installer just comes out with the version set to the default value from the General Settings page in the .ism itself.

I am using an InstallScript-only project (no MSI support). Does that have anything to do with it? If not, what else should I be looking at?

Thanks,
Nathan
Labels (1)
0 Kudos
(4) Replies
nbmont
Level 3

Bump? I still haven't had any success getting this to work.
0 Kudos
Scott_Mayham
Level 3

(Disclaimers first) I've never tried to pass so much stuff on the command line, and I've never worked with TFS.

Back when I was integrating my InstallScript installers with the application builds, I would write a vbscript which used the InstallShield Automation Interface. It's a set of COM objects and methods which allow you to upen an ISM, navigate through the elements of your project, and allows you to set things like the Version, and other things as well. It's an old and honored technique in this community. It's (fairly) well documented on the Flexera website.

I've attached a sample script, which I wrote recently to examine ISMs for compliance with some of an organization's standards. It mostly just looks at stuff, but in some instances it changes things too. It was written quickly, so it's a bit inelegant, but it should be enough to give you a rough idea.

Regards,
0 Kudos
nbmont
Level 3

Thanks for the tip -- I'll go read up on the automation interface...
0 Kudos
nbmont
Level 3

Update: that worked. I created some custom MSBuild tasks in C# and talked to the Automation Interface through those. Version number is updating fine with that method.
0 Kudos