1

I'm using Wix for my application installation and I trying to add to installation the Build Number from TFS as text in on of the dialogs.

All my application dll's and the installer itself has the build number as their file version.

I was able to accomplish this only by getting a file version of an existing EXE(from this post: Getting the file version of a native exe in MSBuild) but not of the running EXE.

 <?define Property_ProductVersion  = "!(bind.FileVersion.UXIDTEST)" ?>
  <Product Id="$(var.ProductId)" Name="$(var.ProductDisplayName)" Language="1033" Version="$(var.Property_ProductVersion)" Manufacturer="$(var.Property_Manufacturer)" UpgradeCode="$(var.ProductUpgradeCode)">
        <Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />

        <Directory Id='TARGETDIR' Name='SourceDir'>
            <Directory Id='xxx'>
                <Component Id='ttt' Guid='{AA2A781C-2324-4F9C-B96C-DCB5BB643409}'>
                   <File Id="UXIDTEST" Source="OriginalDatabase" ></File>
                </Component>
            </Directory>
</Directory>

What can I use to get the file version of the running EXE?

Community
  • 1
  • 1
chen
  • 131
  • 1
  • 1
  • 11
  • What do you mean by "running EXE" ? – Adam Finley Oct 01 '15 at 14:26
  • After I have my installer ready.(setup.exe) I execute this file to install my application, so I want to add to the installer the file version of setup.exe as text of one of the dialogs. – chen Oct 01 '15 at 14:36
  • Are you referring to the version of the exe Burn bootstrapper or something else? Anyway, it appears from your WiX sourse that you want to show the ProductVersion of the MSI file, and if that's correct use [ProductVersion] in your MSI dialogs, where the square brackets cause resolution to the actual value at install time. – PhilDW Oct 01 '15 at 16:36

0 Answers0