title: WIX CustomAction terminates with error 1721 or 1722
body: <p>I'm trying to create a MSI installer for my application which is a customized elasticsearch. I need to run <code>elasticsearch-service.bat install</code> command from cmd in the middle of installation. But whatever I do it will not execute successfully.</p>
  
  <pre><code>&lt;CustomAction Id="InstallService" Directory="elasticsearch" Execute="deferred" Impersonate="no" ExeCommand='[SystemFolder] cmd.exe /c "bin\elasticsearch-service.bat install"' Return="check" /&gt;
  
  &lt;InstallExecuteSequence&gt;
    &lt;Custom Action="InstallService" After="InstallFiles" /&gt;
  &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>1721 and 1722 errors are vague and do not contain any additional information. What is the reason for these error? I was suspicious that these errors are due to lack of admin privileges. But I add <code>InstallPrivileges=elevated</code> and <code>InstallScope=perMachine</code> to package element and still getting the same error. </p>