title: NSIS ExecWait returns 6 when trying to execute exe
body: <p>Hi I have an annoying problem with NSIS.</p>
  
  <p>I'm trying to write script to install the SaveAsPdfAndXps.exe plugin/addin for Office 2007.</p>
  
  <p>Here is my script:</p>
  
  <pre><code>Section "SaveAsPdf"
       DetailPrint "Installing SaveAsPdfAndXps Extension"
       File 'Prereq\SaveAsPDFandXPS.exe'
       ExecWait '$TEMP\SaveAsPDFandXPS.exe' $0
       DetailPrint "SaveAsPDFandXPS exit code = $0"
  ;     Delete '$TEMP\SaveAsPDFandXPS.exe'
  SectionEnd
  </code></pre>
  
  <p>So I'm running Windows 7 x64, I already have Office 07 with this extension installed. However, if I run the exe on my own by clicking it and installing it <strong>manually</strong> it doesn't abort it just installs nicely.</p>
  
  <p>Now the above script, prints out exit <strong>code 6</strong>!? And the if I comment the Delete bit, I don't see the file in my temp directory? How do I find out whats going on?</p>
  
  <p>The SaveAsPDFandXPS extension outputs a log file in the temp dir. if executed manually, but it doesn't happen with the script.</p>
  
  <p>When the compiled setup executes, it does ask for elevation btw.</p>
  
  <p>Regards,</p>