CheckProcess.exe returning 128
Here's my code:
.onInit
Function .onInit
Delete $INSTDIR\install.log
LogSet On
InitPluginsDir
File /oname=$PLUGINSDIR\CheckProcess.exe "CheckProcess.exe"
;Stop Services
!insertmacro SERVICE "stop" "Service1" 0
!insertmacro SERVICE "stop" "Service2" 0
!insertmacro SERVICE "stop" "Service3" 0
;wait for services to fully stop
StrCpy $1 'Service1'
call SleepTilDone
StrCpy $1 'Service2'
call SleepTilDone
StrCpy $1 'Service3'
call SleepTilDone
...
And then the SleepTilDone function is:
Function SleepTilDone
Banner::show /NOUNLOAD "$1 service stopping"
keepSleepin:
Push "0"
IfFileExists $PLUGINSDIR\CheckProcess.exe 0 doneSleepin
nsExec::ExecToStack "$PLUGINSDIR\CheckProcess.exe $1"
Pop $0
MessageBox MB_OK "The return value of CheckProcess.exe is: $0" IDOK 0
IntCmp $0 '0' doneSleepin
Sleep 1000 ;sleep for 1 second
goto keepSleepin ;check again
doneSleepin: ;it's done
Banner::destroy
FunctionEnd
As you can see by the SleepTilDone function, I was thinking that checkProcess.exe was missing, but I was wrong. CheckProcess keeps returning 128 which I have no clue what this is. 0 means the process is running, what does 128 mean? I use this same routine in a lot of installers and don't have any problems with it (even this exact installer on different machines), but on this one it hangs. Any help?
Thanks,
Eric