This is my problem:
I launch the execution of the software via ExecWait, and it will crash the install, because that piece of software launches another process, and closes out. (ex: Watch Adobe updates install - you launch setup.exe; it in turn launches PDApp.exe and closes out.) This becomes problematic when your nsis installer is setup to clean up the update files at the end of the installation, and deletes the install files while they are trying to be installed.
so this is what I've done to prevent that, using Processes:
Section "the App"
File /r "install.bat"
File /r "launch_silent.vbs"
ExecWait 'wscript.exe launch_silent.vbs'
; launch_silent.vbs just calls install.bat silently:
; CreateObject("WScript.Shell").Run "%TEMP%\install.bat",0
; for the sake of this problem, we aren't able to modify install.bat, and have to use it to do ; the installation.
call Check4process
SectionEnd
Function Check4process
Processes::FindProcess "cmd.exe"
IntCmp $R0 1 0 Installed
sleep 6000 ; sleep for 6 seconds
Call Check4process ; check again
Installed:
FunctionEnd Now the vbs calls the .bat file, that runs as a process 'cmd.exe'. Check4process checks for cmd.exe and if it is running, it sleeps. Else, it exits, and continues with the installation. The problem I've come to is, say the customer has another cmd.exe (checking ipconfig or something..) my installer is paused until all cmd.exe windows are closed.
I've tried a couple of things, but I haven't had any luck at this time, and thought I would ask those with way more experience if I've completely botched the use of nsis, or if I'm just missing something that's actually pretty simple.