这就是我想要做的事情:
我想在远程计算机上执行应用程序安装;作为该过程的一部分,在安装新版本之前,我想检查该计算机的注册表中是否有同一应用程序的预先存在的版本。
如果该计算机已安装该应用程序的现有实例,我想找到用于安装它的 MSI,以便我可以备份 MSI 并在必要时执行“回滚”。据我了解,Windows 创建这些 MSI 的副本,并将它们放置在某个临时文件夹中,并在某处使用随机名称,以便可以使用它进行卸载。
我怎样才能找到这个位置?
(此外,有关如何跨网络检查注册表值的建议将不胜感激。)
Here's what I'm looking to do:
I'd like to perform an application install on a remote machine; as a part of that process, before I install the new version, I want to check that machine's registry for a pre-existing version of the same application.
If that machine has an existing instance of the application already installed, I want to find the MSI used to install it, so I can backup the MSI and perform a 'rollback' if necessary. From what I understand, Windows creates a copy of these MSIs and places them in some temp folder with a random name somewhere so that it can use it for uninstalls.
How might I find this location?
(Also, suggestions on how to check the registry values cross-network would be appreciated.)
发布评论
评论(1)
据我了解,您不必找到确切的 MSI 包。要卸载产品,只需了解其产品代码并运行
msiexec /x {PRODUCT-CODE-GUID-HERE}
即可。产品代码可以在“卸载”注册表项(通常为SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
)下找到。As far as I understand, you don't have to find the exact MSI package. In order to uninstall a product, it is enough to know its product code and run
msiexec /x {PRODUCT-CODE-GUID-HERE}
. And product codes can be found under Uninstall registry key (typically,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
).