Wix Hide cmd line window

I am developing an MSI installer that includes the tool.exe file as a <Binary> element. At some point during installation, I need to run tool.exe. Therefore, I have a custom action to execute it:

 <CustomAction Id="RunToolExe" BinaryKey="ToolExe" ExeCommand=" -r 240 -name appservice" Execute="immediate" Return="check" /> 

Then I plan in <InstallExecuteSequence>

Problem: when performing a custom action during installation, the cmd window flashes very quickly. This is a bit inconvenient for the user. Is there any way to hide this screen?

I can’t use WixQuietExecCA beacuse, I just can’t reference the Binary tool.exe in Wix.

+4
source share
2 answers
 <CustomAction Id="SettoolEXEPATH" Property="EXEPATH" Value="&quot;[INSTALLDIR]tool.exe&quot; <additional commands> Execute="immediate"/> <CustomAction Id="EXEPATH" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/> 

You can use WixQuietExecCA, as in the example above, to plan accordingly. The first SettoolEXEPATH action sets the EXEPATH property to the tool.exe tool path, this property name is used as the user action identifier for WixQuietExecCA, which acts as command line parameters.

+2
source

You tried to do it on this to run CA in silent mode

Check out this link for RemoveFiles

0
source

Source: https://habr.com/ru/post/1448021/


All Articles