How to execute the custom action in silent mode in wix?

0

I am trying to execute the custom action at the time of uninstall the installer in wix.It is working perfectly but it is showing the splash screen of cmd prompt at the time of custom action.Latter I tried with CAQuietExec but it is unable to uininstall the installer and giving error. (CAQuietExec: Error 0x80070057: failed to get command line data).

The command that I am using is :

<Fragment>
<Property Id="ModifyOutlookRegInitSign_14" Value="&quot;[SystemFolder]reg.exe&quot; ADD &quot;HKCU\SOFTWARE\Microsoft\Office\14.0\Outlook\Security&quot; /v InitSign /t REG_DWORD /d 0 /f"/>
    <CustomAction Id="ModifyOutlookRegInitSign_14" BinaryKey="WixCA" DllEntry="CAQuietExec"
                Execute="deferred" Return="check" />
    <InstallExecuteSequence>
      <Custom Action="ModifyOutlookRegInitSign_14" Before="InstallFinalize"></Custom>
    </InstallExecuteSequence>

  </Fragment>
wix
custom-action
asked on Stack Overflow Apr 16, 2014 by 123r789 • edited Apr 17, 2014 by 123r789

4 Answers

4

If it is an immediate custom action, the name of the property containing the command line as value must have an Id="QtExecCmdLine". For other types of custom actions read Quiet Execution Custom Action.

answered on Stack Overflow Apr 16, 2014 by taffit
1

It seems to me that you are trying to update HKCU during the uninstall. This is probably because Windows Installer doesn't natively support the ability to do so.

But your proposed solution is lacking in several way. Mainly that it doesn't support rollback and doesn't support cleaning up other user profiles.

Did this registry entry had to be implemented in HKCU? Could it be implemented in HKLM?

answered on Stack Overflow Apr 16, 2014 by Christopher Painter
0

I've created a custom action to kill a process silently like this:

<!-- WixQuietExecCmdLine specify the cmd to be executed -->
<Property Id="WixQuietExecCmdLine" Value='"[WindowsFolder]System32\TaskKill.exe" /F /T /IM MyApp.exe'/>

<!-- From WiX v3.10, use WixQuietExec -->
<CustomAction Id="MyAppTaskKill" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="ignore"/>

<!-- trigger the custom action -->
<InstallExecuteSequence>
    <Custom Action='MyAppTaskKill' Before='InstallValidate'></Custom>  
</InstallExecuteSequence>

You have more info about the possible configuration combinations here: http://wixtoolset.org/documentation/manual/v3/customactions/qtexec.html

answered on Stack Overflow Oct 5, 2017 by André Schuster
0

Wrap your custom action around a Property with Id set to WixQuietExecCmd.

<Property Id="WixQuietExecCmdLine" Value="command line to run"/>

WiX Property Element

WiX Quiet Execution of Custom Action

answered on Stack Overflow Jun 11, 2018 by ArNumb

User contributions licensed under CC BY-SA 3.0