View Single Post
Old 1st November 2017, 16:23   #1
JGU
Junior Member
 
Join Date: Nov 2017
Posts: 3
Batch result is different between excution with NSIS script and manual execution

Hi,

I need to execute a batch file "AutoCompat.bat" which call an exe "Launcher.exe".
Here the code I use:

Name "ExecWait Test"
ShowInstDetails show


Section AutoCompat


SetOutPath "C:\Batch_Folder\AutoCompat"
ExecWait '"C:\Windows\System32\cmd.exe" /K "AutoCompat.bat"'


SectionEnd
OutFile AutoCompat_nsis.exe

The Batch is executed but the value returned by exe called is different from the return value obtain when i launch the batch manually with command prompt.
The exe return 1 when i launch batch with NSIS script but the exe return 0 when i launch it manually

So the final result of batch file isn't the same executed with nsis script than executed manually with command prompt.

Actually i don't understand why i have different behavior betwen NSIS script and manual execution.

I have tested too ExecShell and nsis:Exec command but the result is the same

Thanks for your help.
JGU is offline   Reply With Quote