如何在Windows 7中找到已安装应用程序的UpgradeCode和ProductCode [英] How to find the UpgradeCode and ProductCode of an installed application in Windows 7

查看:762
本文介绍了如何在Windows 7中找到已安装应用程序的UpgradeCode和ProductCode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的机器上安装了一个应用程序.我也有其源代码,但是以某种方式更改了此应用程序的ProductCode和UpgradeCode.

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.

现在,我想获取此已安装应用程序的UpgradeCode和ProductCode.我觉得一定有一些工具可以做到这一点.

Now I want to get the UpgradeCode and ProductCode of this installed application. I feel there must be some tool for this.

任何人都可以让我知道如何获取已安装应用程序的UpgradeCode和ProductCode吗?

Can anyone kindly let me know how to get the UpgradeCode and ProductCode of an installed application?

推荐答案


重要:自从最初发布此答案以来已经有一段时间了,聪明的人提出了更明智的答案.检查我如何如果需要可靠而全面的方法,可以从@ SteinÅsmul找到要安装的MSI文件的升级代码?.


IMPORTANT: It's been a while since this answer was originally posted, and smart people came up with wiser answers. Check How can I find the Upgrade Code for an installed MSI file? from @ Stein Åsmul if you need a solid and comprehensive approach.

这是另一种方式(您不需要任何工具):

Here's another way (you don't need any tools):

  • 打开系统注册表并搜索HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall项(如果它是64位计算机上的32位安装程序,则可能位于HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall下).
  • 该键下列出的GUID是此计算机上安装的产品
  • 找到您要讨论的内容-一步一步,直到在右窗格中看到其名称为止
  • open system registry and search for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key (if it's a 32-bit installer on a 64-bit machine, it might be under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall instead).
  • the GUIDs listed under that key are the products installed on this machine
  • find the one you're talking about - just step one by one until you see its name on the right pane

您在此GUID上停止的是ProductCode.

This GUID you stopped on is the ProductCode.

现在,如果您确定可以重新安装此应用程序,则可以运行以下命令行:

Now, if you're sure that reinstallation of this application will go fine, you can run the following command line:

msiexec/i {PRODUCT-CODE-GUID-HERE} REINSTALL =全部REINSTALLMODE =正常/l * v log.txt

msiexec /i {PRODUCT-CODE-GUID-HERE} REINSTALL=ALL REINSTALLMODE=omus /l*v log.txt

这将修复"您的应用程序.现在查看日志文件并搜索"UpgradeCode".此值将转储到那里.

This will "repair" your application. Now look at the log file and search for "UpgradeCode". This value is dumped there.

注意:仅当您确定正确执行了重新安装流程并且不会破坏已安装的应用程序时,才应该这样做.

NOTE: you should only do this if you are sure that reinstall flow is implemented correctly and this won't break your installed application.

这篇关于如何在Windows 7中找到已安装应用程序的UpgradeCode和ProductCode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆