问题描述
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!