title: Install a software: launching a command before the installation and another one after it
body: <p>I am trying to create an installation package with NSIS, and I need to launch a command before the installation and another one after it.</p>
  
  <p>This is what I tried without success:</p>
  
  <pre><code>Name "MyProgram"
  OutFile "MyInstall.exe"
  InstallDir "$PROGRAMFILE\MyProgram"
  
  Function .onInit
      !system vs_redist.x64.exe
  FunctionEnd
  
  Section "My Program"
      SetOutPath $INSTDIR
      File /r "xamp\*.*"
      File "start.bat"
      File "readme.txt"
  SectionEnd
  
  Function .onInstSuccess
      !system xampp/setup_xampp.bat
  FunctionEnd
  </code></pre>
  
  <p>It seems it does not call the two functions</p>