从命令行卸载 MSI 文件而不使用 msiexec

Uninstalling an MSI file from the command line without using msiexec(从命令行卸载 MSI 文件而不使用 msiexec)
本文介绍了从命令行卸载 MSI 文件而不使用 msiexec的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

msiexec 是安装 MSI 程序的命令提示符软件.但是我发现您可以通过在命令行中输入 MSI 文件的名称来从命令行安装 MSI 文件.

msiexec is command prompt software that installs an MSI program. But I have found that you can install an MSI file from the command line by just typing in the name of the MSI file on the command line.

但为了卸载 MSI 文件,您似乎必须调用 msiexec 程序并给它一个 /x/uninstall.

But in order to uninstall the MSI file, it seems you have to call the msiexec program and give it a /x or /uninstall.

如何在不使用 msiexec 例程的情况下从命令行卸载 MSI?

How can I uninstall an MSI from the command line without using the msiexec routine?

推荐答案

简答:你不能.使用 MSIEXEC/x

Short answer: you can't. Use MSIEXEC /x

长答案:当您直接在命令行运行 MSI 文件时,所发生的只是它为您运行 MSIEXEC.此关联存储在注册表中.您可以通过(在 Windows 资源管理器中)转到工具/文件夹选项/文件类型来查看关联列表.

Long answer: When you run the MSI file directly at the command line, all that's happening is that it runs MSIEXEC for you. This association is stored in the registry. You can see a list of associations by (in Windows Explorer) going to Tools / Folder Options / File Types.

例如,您可以从命令行运行 .DOC 文件,WordPad 或 WinWord 将为您打开它.

For example, you can run a .DOC file from the command line, and WordPad or WinWord will open it for you.

如果您在 HKEY_CLASSES_ROOT.msi 下查看注册表,您会看到 .MSI 文件与 ProgIDMsi.Package"相关联.如果您查看 HKEY_CLASSES_ROOTMsi.PackageshellOpencommand,您会看到 Windows 在运行" .MSI 文件时实际使用的命令行.

If you look in the registry under HKEY_CLASSES_ROOT.msi, you'll see that .MSI files are associated with the ProgID "Msi.Package". If you look in HKEY_CLASSES_ROOTMsi.PackageshellOpencommand, you'll see the command line that Windows actually uses when you "run" a .MSI file.

这篇关于从命令行卸载 MSI 文件而不使用 msiexec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
quot;Overflowquot; compiler error with -9223372036854775808L(编译器错误-9223372036854775808L(Q;溢出Q))
Visual Studio 2010 ReportViewer Assembly References(Visual Studio 2010 ReportViewer程序集引用)
Weird behaviour when I open a reportviewer in WPF(在WPF中打开报表查看器时出现奇怪的行为)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)