Exec not working in NSIS installer

nsis

Solution

The answer from Seki is mostly correct, I'd just like to add that the correct syntax for Exec/ExecWait is always `Exec '"c:\path\app.exe" param1 "par am2" param3'`

Parameters are of course optional but the path to the app should always be quoted, not just because in your case where $INSTDIR could contain spaces but at least on Win9x it will fail no matter what if you don't quote (According to the NSIS manual)

If the spaces/lack of quotes is not the issue then there are a couple of other things you might want to look into:

- $OUTDIR is the working directory for the new process (SetOutPath sets this)

- Missing dll's etc (Check with Process Monitor)

Problem

I am new to NSIS i am trying to execute an executable while installation similar to pre request. I tried the below code which copies the exe to the installation path but it is not executing it. ``` Section "example" example SetOutPath "$INSTDIR" File "setup.exe" Exec "$INSTDIR\setup.exe" BringToFront SectionEnd ```

Original source