我想使用 msbuild 目标检查已安装的 msi 产品详细信息,例如产品密钥、代码和其他。
我想使用以下语法使用产品代码卸载 msi:
msiexec /x {PRODUCT-CODE-GUID-HERE}
任何人都可以帮助我提供示例代码。
谢谢和问候, 桑托什·库马尔·帕特罗
我想使用 msbuild 目标检查已安装的 msi 产品详细信息,例如产品密钥、代码和其他。
我想使用以下语法使用产品代码卸载 msi:
msiexec /x {PRODUCT-CODE-GUID-HERE}
任何人都可以帮助我提供示例代码。
谢谢和问候, 桑托什·库马尔·帕特罗
经过我的分析,我发现有两种方法可以解决这个问题,如下所述:
一个。使用 C# 从 Registry 中读取产品代码,并将其与自定义任务挂钩,并在 Custom Build proj 文件中调用它。
为了完成上述要点,以下链接很有用: 获取已安装 Msi 的产品代码 http://tech.pro/tutorial/934/creating-msbuild-tasks-in-csharp
湾。使用 Powershell 脚本卸载已安装的 MSI。在这里,我需要从 Custom Build proj 文件中调用 powershell 脚本。
为了完成上述要点,以下链接很有用: http ://www.asp.net/web-forms/tutorials/deployment/advanced-enterprise-web-deployment/running-windows-powershell-scripts-from- msbuild-project-files http://nzbart.blogspot.in/2012/11/correctly-executing-powershell-script.html http://thoughtsofmarcus.blogspot.in/2012/12/clever-uninstall-of-msi。 html
谢谢和问候, 桑托什·库马尔·帕特罗