msiexec是安装MSI程序的命令提示符软件.但我发现只需在命令行输入MSI文件的名称,就可以从命令行安装MSI文件.
但是为了卸载MSI文件,你似乎必须调用该msiexec程序并给它一个/x或/uninstall.
如何在不使用msiexec例程的情况下从命令行卸载MSI ?
我从这里下载了Azure SDK for .NET 2.5 , - "创作工具","Azure工具"和"libs for .net"软件包,并一个接一个地安装它们.安装成功,Visual Studio 2012甚至提供了以后迁移我的.ccproj项目.
问题是它们不在"添加/删除"程序列表中(SDK 1.8组件在该列表中),所以我不知道如何开始卸载SDK.
如何卸载这些东西?
正如大多数人可能注意到的那样,当卸载MSI软件包时,Windows将要求提供原始.msi文件.这是为什么?
我只能看到它的缺点:
有人可以对此有所了解吗?
我想通过使用我的代码卸载软件,我已经尝试过wmic方法来执行卸载,但它无法在系统中找到我的软件.是否可以在不使用msi文件或任何设置文件的情况下卸载.我找到了这段代码,但它不起作用---
public string GetUninstallCommandFor(string productDisplayName)
{
RegistryKey localMachine = Registry.LocalMachine;
string productsRoot = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products";
RegistryKey products = localMachine.OpenSubKey(productsRoot);
string[] productFolders = products.GetSubKeyNames();
foreach (string p in productFolders)
{
RegistryKey installProperties = products.OpenSubKey(p + @"\InstallProperties");
if (installProperties != null)
{
string displayName = (string)installProperties.GetValue("DisplayName");
if ((displayName != null) && (displayName.Contains(productDisplayName)))
{
string uninstallCommand = (string)installProperties.GetValue("UninstallString");
return uninstallCommand;
}
}
}
return "";
}
Run Code Online (Sandbox Code Playgroud) 它在我的机器上使用随机应用程序启动Windows安装程序..点击取消几次后,它加载vb6罚款.
任何想法为什么会这样?
uninstall ×3
msiexec ×2
.net ×1
azure ×1
c# ×1
command-line ×1
installation ×1
installer ×1
vb6 ×1