Reading current installed version of an application using windows api

后端 未结 3 767
清歌不尽
清歌不尽 2021-01-21 08:17

I was trying to use windows api to find out the version info of an installed application.

I used the upgrade code to find out the product code using MsiEnumRelatedProduc

3条回答
  •  执念已碎
    2021-01-21 08:52

    In response to @JoshHetland the string to pass is the CamelCase postfix of the INSTALLPROPERTY_VERSIONSTRING - remember that MSI is case sensitive.

    So:

    INSTALLPROPERTY_VERSIONSTRING becomes VersionString

    INSTALLPROPERTY_INSTALLDATE becomes InstallDate

    and so on.

    Complete list of properties available is on the MSDN page for the MsiGetProductInfo function .

提交回复
热议问题