If you are using Visual Studio to create the WIX based installer then you can define your ProductVersion
variable in the .wixproj
file.
<Target Name="BeforeBuild">
<PropertyGroup>
<DefineConstants>ProductVersion=1.0</DefineConstants>
...
</PropertyGroup>
</Target>
This would be accessible from .wxs file by $(var.ProductVersion)
. Now you can use XPath to read the value of DefineConstants
from your .wixproj file. This will get you ProductVersion = "1.0.0.0"