我正在使用wceload.exe安装我的应用程序的cab文件。当我的应用程序已经存在时,它会显示消息“我的应用程序已安装。还是安装?”如何避免这条消息?我使用
时会启动Cab文件安装ProcessStartInfo info = new ProcessStartInfo();
info.FileName = @"\windows\wceload.exe";
info.Arguments = "\\My_Installer.cab";
Process proc = new Process();
proc.StartInfo = info;
proc.Start();
proc.WaitForExit();
当我使用
时info.Arguments = "\\My_Installer.cab /silent";
或
info.Arguments = "/noaskdest /noui \\My_Installer.cab";
没有任何反应。我做错了什么?
答案 0 :(得分:3)
如果对某人有必要,这是完整的解决方案:
ProcessStartInfo info = new ProcessStartInfo();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
Process proc = new Process();
// uninstalls application
doc.LoadXml("<wap-provisioningdoc>" +
"<characteristic type=\"UnInstall\">" +
"<characteristic type=\"MyManufactuer MyApplication\">"+
"<parm name=\"uninstall\" value=\"1\"/>" +
"</characteristic>" +
"</characteristic>" +
"</wap-provisioningdoc>");
Microsoft.WindowsMobile.Configuration.ConfigurationManager.ProcessConfiguration(doc, false);
// installs application
info.FileName = @"\windows\wceload.exe";
info.Arguments = @"\My_Installer.cab";
// start the process
proc.StartInfo = info;
proc.Start();
proc.WaitForExit();