title: How can I get NSIS to install and execute files from a temp directory?
body: <p>I'm using the following NSIS script:</p>
  
  <pre><code>Name "My app wrapper"
  Outfile "MyAppSetup.exe"
  InstallDir $TEMP\MyApp\Install
  Function .onInit
  SetSilent silent
  FunctionEnd
  Section ""
      SetOutPath $TEMP\MyApp\Install
      File installer.msi
      File setup.exe
      Exec setup.exe
  SectionEnd
  </code></pre>
  
  <p>The intention is that the installer will wrap up those two files, installer.msi and setup.exe (which is a bootstrapper to install prereqs and then call installer.msi) into the MyApp Setup.exe file. When MyAppSetup.exe is run, it should extract installer.msi and setup.exe to the $Temp\MyApp\Install directory, and it should run setup.exe from that directory.</p>
  
  <p>However, when I run MyAppSetup from the desktop, it executes a setup.exe file that it finds on the desktop, and I don't even see a MyApp\Install directory in C:\Temp.</p>
  
  <p>What do I need to do to get this script to install the files to the right location and to execute the right file?</p>