Check out the Wiki post for more info.
Example:
${!MSIPropertyGet} "SomePackage.ProductName" "SomePackage.msi" "ProductName"
${!MSIPropertyGet} "SomePackage.ProductVersion" "SomePackage.msi" "ProductVersion"
!define DisplayName `${SomePackage.ProductName} v${SomePackage.ProductVersion}`
OutFile Test.exe
Name `${DisplayName} Special Build`
Section
SectionEnd