我使用本守则 (也试过了)在注册表中使用卸载字符串卸载程序,但是第一个链接的代码中有一些错误。我试图修复它,但我很难弄清楚什么是文件名,什么是在争论中。我的UninstalString是:
rundll32.exe dfshim.dll,ShArpMaintain ItemMan.Client.application,Culture=neutral,PublicKeyToken=4f1069eb693dc232,processorArchitecture=msil
注册表中的目录是
CurrentUser\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\9e648bbdf5bc3053
我遇到麻烦的部分是:
System.Diagnostics.Process FProcess = new System.Diagnostics.Process();
FProcess.StartInfo.FileName = "rundll32.exe"; (Dont know if this is right though, but have tried various ways to write the FileName...)
FProcess.StartInfo.Arguments = "9e648bbdf5bc3053";
FProcess.StartInfo.UseShellExecute = false;
FProcess.Start();
FProcess.WaitForExit();有了这一点,什么都不会发生。我尝试过的所有其他方法都会造成错误。HOw --你会剪掉/用你的uninstalString卸载那个程序吗?
发布于 2013-02-06 09:59:51
卸载字符串是整个过程,第一个可执行文件之后的所有内容都是参数,因此您需要执行如下操作:
var start_info = new StartInfo() {
FileName = "rundll32.exe",
Arguments = "dfshim.dll,ShArpMaintain ItemMan.Client.application, Culture=neutral, PublicKeyToken=4f1069eb693dc232, processorArchitecture=msil",
UseShellExecute = false
};
Process process = new Process(start_info);
process.Start();
process.WaitForExit();https://stackoverflow.com/questions/14725793
复制相似问题