Is there an alternative to GUID when using msiexec to uninstall an application?

后端 未结 3 1392
粉色の甜心
粉色の甜心 2020-12-02 01:14

We\'re currently using a GUID to identify the application when running our uninstall script which contains msiexec. The problem I\'m having is the GUID changes every time I

3条回答
  •  星月不相逢
    2020-12-02 02:12

    The usual way that people get around the various ProductCode values in this situation is to start with the more constant UpgradeCode.

    Given the UpgradeCode, you can use MsiEnumRelatedProducts (or script or MSI interop equivalent) to return the ProductCode. Code like this typically never needs to be changed.

    I'm pretty sure PowerShell should be able to do this.

提交回复
热议问题