自定义msiexec进度条?

Customize msiexec progress bar?

我的应用程序调用 msiexec 以 运行 卸载。

   logger->LogDebug("Actions: MsiUninstallExec()!");
    System::Diagnostics::Process ^p = gcnew System::Diagnostics::Process();
    p->StartInfo->FileName = "msiexec";
    p->StartInfo->Arguments = "/x " + AppSetting::ProductCode;
    p->Start();
/// -->>> Uninstall
/// -->> Choose restart or not.
/// -->>> Application Exit

卸载完成后,用户必须选择重新启动或不完成此过程。 但我的客户要求:"The progress bar of msiexec must move to the last (right end)." 如何编辑它?你对我有什么想法吗?

msiexec /passive /x ProductCode

这应该只为您提供 ProgressBar UI。您还可以询问用户是要跳过重启还是在卸载完成时始终强制重启。然后可以适当添加/norestart/forcerestart选项。

建议:你可以这样试试():

msiexec.exe /X {PRODUCT-GUID} /QN REBOOT=ReallySuppress /L*V "C:\Temp\msilog.log" 

快速命令行解释:

 /X {PRODUCT-GUID}          = run uninstall sequence for specified product 
 /QN                        = run completely silently
 /REBOOT=ReallySuppress     = suppress reboot prompts
 /L*V "C:\Temp\msilog.log"  = verbose logging at specified path

备选方案:调用 MSI 卸载的方法有很多:Uninstalling an MSI file from the command line without using msiexec。您可以通过以下方式卸载:msiexecARPWMIPowerShell、部署系统如SCCMVBScript / COM 自动化,DTF,或通过 hidden Windows cache folders,以及一些其他选项。


msiexec.exemsiexec.exe[=67有两种口味=] 命令行。一个原始的和后来的一个添加了 "full word" 开关,例如 /quiet/noreboot 等。原始命令行使用 /qn 作为静默模式的开关。以下是两种版本的链接:MSIEXEC what is the difference between qn and quiet.


部分链接:

  • Silent installation of a MSI package
  • How to report msi installation status on quiet install