No announcement yet.

FileVersion tool for Setup Factory

  • Filter
  • Time
  • Show
Clear All
new posts

  • FileVersion tool for Setup Factory

    I have build a new small command line tool for Setup Factory (can be used as well with TrueUpdate and Visual Patch) that might be useful. Using this tool, you will be able to create or modify an unattended build constants file, inserting the file version info from a certain file. The idea is to use this constants file for naming automatically the installer that is created, and/or using the detected file version in the screens of the installer.

    How to use

    First, insert the #BUILD# constant into your project (the name of the constant cannot be changed), like shown in this image. You may set an initial value for the constant, but this is not mandatory.

    Now you can use the constant in your project file. For example, you can set the output filename, using the constant:

    You may use the constant in the installer resources as well, as in this example:

    And of course, you can use the build constant to set a session variable, so the same information can be displayed in the dialogs of your installer:

    After you have set up your project to use the #BUILD# constant, all you need now is feed the version info of the main component of your project into this constant. You will create a new or modify an existing INI file with build constants, with a command like this:

    FileVersion.exe "C:\My Project\Product.exe" "C:\My Project\build.ini"
    This command will set the #BUILD# value in the [Constants] section of the INI file named build.ini with the file version info of Product.exe. If the file build.ini already exists, all former values are kept and only #BUILD# will be updated.

    You will typically execute this command before starting the unattended build of your installer. Here is one example of a possible batch file:

    ECHO Updating the unattended build constants file
    FileVersion.exe "C:\My Project\Product.exe" "C:\My Project\build.ini"
    ECHO Creating installer
    SUF80Design.exe /BUILD myproduct.sf8 /CONST:"C:\My Project\build.ini"
    If you are interested, you can find the tool at my site.

    Last edited by Ulrich; 04-19-2017, 07:22 AM.

  • #2
    Thanks, I can certainly give it a try.

    What does a build constant file build.ini file look like? Is it just the Build constant followed by the value you want to change? example:

    #BUILD# 2.0


    • #3
      As the name implies, build.ini is an INI file, and it follows the well-known format of INI files.