Archive: NSIS ExecWait dosen't wait when installing the setup file via chrome browser


NSIS ExecWait dosen't wait when installing the setup file via chrome browser
When downloading the .exe installation file (NSIS installation) and opening it via chrome in order to execute it the ExecWait dosen't work.

I'm running a batch file which kill browsers processes inside of the installation, because I opened the exe file via the chrome (Download Manager) the ExecWait think that the execute has ended and therefore dosen't wait for the next ExecWait calls that coming after the line which call to execute the batch file. It think that chrome was the parent process so it quitting the installation.

Is there a way to let the ExecWait know that although I killed the chrome browser (or any other browsers) process to continue the installation? and waiting for only the .exe files that I execute via the NSIS script?

P.S - When installing the .exe file out of the browser (download manager) it works fine.


Edit (i have included codes):
EDIT (I HAVE INCLUDED CODES):

NSIS code:
#-----------------------------------
# define the name of the installer
outfile "setup.exe"
Name "Example"

installDir $LOCALAPPDATA\Test

# default section
section

setOutPath $INSTDIR
File install.exe
File test.exe

ExecWait $INSTDIR\install.exe
Delete $INSTDIR\install.exe
ExecWait $INSTDIR\test.exe
Delete $INSTDIR\test.exe

sectionEnd


#-----------------


and inside of the install.exe (its a .bat file the I compile to an .exe file) this code:

@echo off
taskkill /F /IM chrome.exe /T
If you download the setup.exe via chrome and executing it from the bottom bar (download manager) it will execute install.exe (closing chrome.exe) but will skip this lines:

Delete $INSTDIR\install.exe
ExecWait $INSTDIR\test.exe
Delete $INSTDIR\test.exe


ExecWait always waits for the child process it started but it does not wait for grandchildren...


you should use the nsprocess plugin or nsis to kill or obey tasks.