cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Ih8stupidrules
Level 4

How to auto-name Setup.exe with version number?

Hi all,

I've searched, but haven't found, so I'll ask:

- In a basic MSI project with a 'setup.exe' bootstrapper, is there a way to 'auto-name' the setup.exe to something like 'OurProduct [ProductVersion].exe' ?

- Tried "OurProduct {ProductVersion}", but it just literally outputs "OurProduct {ProductVersion}.exe"
- Tried "OurProduct [ProductVersion]", again, just outputs OurProduct [ProductVersion].exe
- Tried "OurProduct [{ProductVersion}]", still no go, just got the same literal string...
Labels (1)
0 Kudos
5 Replies
chrislynn5
Level 6

Any luck, I'm trying to do the same and in WISE this is simple.
0 Kudos
Ih8stupidrules
Level 4

None so far, but I've stopped looking into the problem for a while...

I'll need to look into it again, I have to build a program to automate our build.
0 Kudos
RobertDickau
Flexera Alumni

It takes a little bit of doing, but if you're using the InstallShield automation interface, you could read the project's value of ISWiProject.ProductVersion, and then feed that back onto the end of ISWiProductConfig.SetupFileName before performing the build...
0 Kudos
RobertDickau
Flexera Alumni

For example, something like this in a .vbs file:
Set oISM = CreateObject("ISWiAuto16.ISWiProject")
oISM.OpenProject("Sample App 3000.ism")

' get ProductVersion...
pv = oISM.ProductVersion

' ...add it to the setup.exe file name...
oISM.ISWiProductConfigs("v100").SetupFileName = "setup_" + pv

' ...and build the project
oISM.ISWiProductConfigs("v100").ISWiReleases("dvd").Build( )

oISM.SaveProject
oISM.CloseProject

Then run the script using cscript /nologo rename_and_build.vbs.

Ideally wouldn't use hard-coded product config and release names, but it's a start...
0 Kudos
Ih8stupidrules
Level 4

Thanks Robert!!

I don't have the time to try this out right now, but I'll keep a sticky on this and update when I try it: it looks like it should solve the problem nicely!

(and thanks to chrislynn5 for bumping the thread! 😄 )
0 Kudos