Archive: ExecWait....issues


ExecWait....issues
I have read over 20 pages of issues with ExecWait...but I just cannot find out what is going on. I am trying to run an executable during this install...basically the exe updates a DB...so I wanted to update the DB then continue with the install...it just flies thru the install and doesn't wait. It also deletes it before it can execute....here is my code.


!define PRODUCT_NAME "Test"
!define PRODUCT_VERSION "1.0"
!define ShortName "Test"
!define PRODUCT_PUBLISHER "Test"
!define PRODUCT_WEB_SITE "http://www.Test.com"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\installDir2\p.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "..\License Agreement.rtf"
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Test_1.0.2_Update.exe"

InstallDir "$PROGRAMFILES\${SHORTNAME}"

ShowInstDetails show

Section "MainSection" SEC01
SetOutPath "$TEMP"
File "Test_DBUPDATE.exe"
ExecWait '"$TEMP\Test_DBUPDATE.exe"'
Delete "$TEMP\Test_DBUPDATE.exe"
SectionEnd

Section "MainSection2" SEC02
ReadRegStr $0 HKLM "SOFTWARE\Test" ""
DetailPrint "$0"
SetOutPath "$0"
SetOverwrite on
File "Test.exe"
SectionEnd

Section -Post
SectionEnd

I have even tried to put in some DetailPrint commands before and after to slow it down...those won't even show.


It just works.


Are you saying the code works for you?....


Indeed. Tried with this script and calc.exe from $SYSDIR.


Hmmm..it might be the exe I am using...it is a .jar file I converted to an .exe....


Perhaps there is an asynchronous call of some sort inside the exe's code, or maybe it spawns another process.


The other thing I can do is pause it...but when I put DetailPrint...it wont show anything...