How to find the UpgradeCode and ProductCode of an installed application in Windows 7

后端 未结 11 1386
囚心锁ツ
囚心锁ツ 2020-11-27 04:36

I have an application installed on my machine. I also have its source code but somehow the ProductCode and UpgradeCode of this application were changed.

Now I want t

11条回答
  •  温柔的废话
    2020-11-27 04:53

    In Windows 10 preview build with PowerShell 5, I can see that you can do:

    $info = Get-Package -Name YourInstalledProduct
    $info.Metadata["ProductCode"]
    

    Not familiar with even not sure if all products has UpgradeCode, but according to this post you need to search UpgradeCode from this registry path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes
    

    Unfortunately, the registry key values are the ProductCode and the registry keys are the UpgradeCode.

提交回复
热议问题