简体   繁体   English

使用setup.exe卸载

[英]Uninstalling using setup.exe

I'm not sure if the tags are appropriate, I added them as they deal with my specific situation. 我不确定这些标签是否合适,我在处理它们的具体情况时添加了它们。

I created an Outlook Add-In. 我创建了一个Outlook加载项。 To install it I created a Setup Project. 要安装它,我创建了一个安装项目。 The setup project creates a .msi and a setup.exe. 安装项目将创建一个.msi和一个setup.exe。 I use the setup.exe to install the .msi. 我使用setup.exe安装.msi。 Done. 完成。 That works great. 效果很好。 I can run the setup.exe from the command prompt and install it silently like so "setup.exe /quiet". 我可以从命令提示符下运行setup.exe并像“ setup.exe / quiet”一样静默安装它。 That works. 这样可行。 Now, I'm trying to figure out how to uninstall it silently as well using the command line. 现在,我试图找出如何使用命令行静默卸载它。

If I try "setup.exe /x" it just brings up a window of the available commands (/x being one of them). 如果尝试“ setup.exe / x”,它将弹出一个可用命令的窗口(/ x是其中之一)。 This happens as well if I try "setup.exe /x {product key}" or "setup.exe /x //". 如果我尝试“ setup.exe / x {产品密钥}”或“ setup.exe / x //”,也会发生这种情况。

If I try "setup.exe /uninstall" i get a message saying: 如果我尝试“ setup.exe / uninstall”,我会收到一条消息:

This patch package could not be opened. 无法打开该补丁程序包。 Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package. 验证补丁程序包是否存在并且可以访问它,或者与应用程序供应商联系以确认这是有效的Windows Installer补丁程序包。

If I try "setup.exe /uninstall {product key}" i get: 如果我尝试“ setup.exe / uninstall {产品密钥}”,我会得到:

The patch is not applied to this product. 该补丁不适用于该产品。

The only I've been able to uninstall has been through double clicking the setup.exe and clicking "Remove Product" or through the Program and Features window. 我唯一可以卸载的方法是双击se​​tup.exe,然后单击“删除产品”,或者通过“程序和功能”窗口。

The reason for this is if I update the setup project version and install the new version it will remove the old version, but when I run Outlook the new version of the addin is inactive. 原因是如果我更新安装项目版本并安装新版本,它将删除旧版本,但是当我运行Outlook时,外接程序的新版本处于无效状态。 This doesn't happen on a fresh install. 全新安装不会发生这种情况。 I wanted to write a batch file that will uninstall the old addin and then install the new one. 我想编写一个批处理文件,该文件将卸载旧的插件,然后安装新的插件。

I don't know if there is a better way of getting the addin inside of Outlook, the only way in the tutorial mentioned was windows installer. 我不知道是否有更好的方法可以在Outlook中获取插件,提到的教程中唯一的方法是Windows Installer。 The addin is going inside Outlook 2013 if that matters. 如果重要的话,该插件将进入Outlook 2013。

If you need any more info let me know. 如果您需要更多信息,请告诉我。

You need to make such a call: msiexec.exe /x {..<your MSI product code>..} 您需要进行这样的调用: msiexec.exe /x {..<your MSI product code>..}

Read more about the Windows Installer service: http://technet.microsoft.com/en-us/library/cc759262(v=ws.10).aspx 阅读有关Windows Installer服务的更多信息: http : //technet.microsoft.com/zh-cn/library/cc759262(v=ws.10).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM