cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
circ905
Level 2

How to make Product Version property match executable's version number automatically

I'm using IS 2011 Professional and I have an InstallShield project with 2 executable's. How do I change the product version property in General Information of InstallShield to match one of my executable's version number. I'm doing auto builds using TFS.

Thanks in advance!!
Labels (1)
0 Kudos
(6) Replies
Alpesh
Flexera Alumni

Hi,

You can use Automation Interface or the ISCmdBld.exe command line to do so. Basically, you will use some Windows api to query the exe version and then using Automation Interface or ISCmdBld.exe command line (-y), you will set the ProductVersion property.

I hope this helps.

Thanks!
0 Kudos
LanceRas
Level 7

I use FinalBuilder and use it's actions to build the IS projects, grabbing the version numbers and passing it on to the automation building.
0 Kudos
CodeGuru
Level 4

Alpesh wrote:
Hi,

You can use Automation Interface or the ISCmdBld.exe command line to do so. Basically, you will use some Windows api to query the exe version and then using Automation Interface or ISCmdBld.exe command line (-y), you will set the ProductVersion property.

I hope this helps.

Thanks!


Can you elaborate on how this is done using the Automation Interface?

I'm using TFS 2010 team build with Installshield integrated into my Visual Studio Solution and have found 0 information and i've been searching for weeks.
0 Kudos
Cary_R
Level 11

Hi There,

Let's say you want to do this via a VBScript that kicks off the build of your project after tweaking the version number of the main executable.

--Open the InstallShield Project with the ISWiProject object's "Open" method
--Grab the named feature from the ISWiFeatures collection
--Grab the named component from the ISWiComponents collection under the feature
--Grab the named file from the ISWiFiles collection under the component
--Grab the full path to the source file from the ISWiFile object's FullPath property.

--Use the Scripting.FileSystemObject's GetFileVersion method to get the Version number

--At this point, you can use WSHell.Run to kick off iscmdbld.exe, or you can assign to the ISWiProject's ProductVersion property followed by SaveProject(), and/or go through the ISWiProductConfigs / ISWiReleases collections and finally call the Build() method of the appropriate ISWiRelease object.

Sounds confusing, but you get used to it once you get the hang of everything being stored in collections that hang off of the ISWiProject object:

http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/IHelpAutoISWiProject.htm

Hope this points you in the right direction,

Cary
0 Kudos
CodeGuru
Level 4

Thanks Cary but using Installshield 2011 and TFS 2010, we shouldn't have to do it that way. Installshield advertises integration with TFS 2010.

I've tried it the integrated way using the Automation Interface as displayed here: http://community.flexerasoftware.com/showthread.php?t=195743

Using the automation interface works on my dev box, but not using TFS build.
0 Kudos
Cary_R
Level 11

I apologize; I didn't realize that there was more context to the problem you were describing (it must seem rather obvious, the information I posted).

In any case, my best guess as to what's happening on your TFS server is perhaps due to the user context in which the build is trying to kick off.

Perchance, is the TFS build running in the context of the SYSTEM account? I feel like I ran into something a bit like this some years back, and that was somehow the source of the issue.
0 Kudos