Visual studio only allows Product Version Property format in form of ##.##.#### only. For forth field it would give Build error for setup Project

Windows Installer Product Version Property only allows the format major.minor.build

 

However general MSI build application would use the Four field Product version

Considering major.minor.Build.Revision, the forth field however is insignificant to MSI

 

Workaround

 

1. we could manually open the MSI file using Windows Installer Database Editor Tool ORCA and change the Product version Property

 

2. we can automate it using Visual studio, we would need to create Post build event like this

cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "UPDATE `Property` SET `Value`=’x.x.x.x' WHERE `Property`='ProductVersion'

(Where “ x” is any Integer Value)

 

Select Visual studio setup Project and PostBuild event from Properties, add the above script in Post build event

we would need to place WiRunSql.vbs under Solution folder to run this event (to get this VBS file please Install Windows Installer 4.5 SDK )

 


CONTENT : Gaurav Bodar


REVIEW : Ravi Shankar