Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 install the latest version of the application, so I was wondering if there is a different way that I can identify our application running using msiexec?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.0k views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...