Customize msiexec progress bar?

2019-07-31 12:46发布

My application call msiexec to run uninstall.

   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

When uninstallation is done, users have to choose restart or not to complete this process. But my customer request : "The progress bar of msiexec must move to the last (right end)." How to edit it ? Do you have any idea for me?

enter image description here

2条回答
The star\"
2楼-- · 2019-07-31 13:36
msiexec /passive /x ProductCode

This should give you just the ProgressBar UI. You can also ask the user whether they want to skip restart or always force restart when the Uninstall completes. Then can add the /norestart or /forcerestart option appropriately.

查看更多
神经病院院长
3楼-- · 2019-07-31 13:49

Suggestion: You can try something like this (find product GUID):

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

Quick command line explanation:

 /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

Alternatives: There are many ways to invoke MSI uninstall: Uninstalling an MSI file from the command line without using msiexec. You can uninstall via: msiexec, ARP, WMI, PowerShell, deployment Systems such as SCCM, VBScript / COM Automation, DTF, or via hidden Windows cache folders, and a few other options.


msiexec.exe: There are two flavors of the msiexec.exe command line. An original one and a later one that added the "full word" switches such as /quiet and /noreboot and the likes. The original command line used /qn as the switch for silent mode. Here are links to both flavors: MSIEXEC what is the difference between qn and quiet.


Some Links:

查看更多
登录 后发表回答