check file version, if statement in msi package
Hi, is there a way to make a if statement in the msi package to check file version of a file and if lower than version x.x.x continue install?
can someone try to explain it maybe?
Thanks
/Kenneth
can someone try to explain it maybe?
Thanks
/Kenneth
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
Aaron
20 years ago
Windows Installer has it's own built-in version checking. If you would like to leave an older version behind if present, you will need to manipulate the entry in the component table a bit. You would need to take whatever integer is in the attributes column of the component in question and add 128 to it. Check the 'Component Table' topic in the Windows Installer SDK for more information.
http://msdn.microsoft.com/library/en-us/msi/setup/component_table.asp
On EDIT:
I re-read your question and I think I have a new answer for you. :-)
You will need to check the file version using the Signature and AppSearch tables. You could also use a VBScript custom action to get the version of a file and populate a property. You could then add a condition to the component that checks that property against whatever value you need. Sorry I misread your question the first time around, but I hope this helps you.
http://msdn.microsoft.com/library/en-us/msi/setup/component_table.asp
On EDIT:
I re-read your question and I think I have a new answer for you. :-)
You will need to check the file version using the Signature and AppSearch tables. You could also use a VBScript custom action to get the version of a file and populate a property. You could then add a condition to the component that checks that property against whatever value you need. Sorry I misread your question the first time around, but I hope this helps you.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.