|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Junior Member
Join Date: Apr 2015
Posts: 2
|
ExecWait exit code return error when embedding installers
Hello I have a simple problem. I do not undestand the Error in documentation of ExecWait.
Here is a part of the documenatation text: If an output variable is specified, ExecWait sets the variable with the exit code (and only sets the error flag if an error occurs; if an error occurs the contents of the user variable are undefined). So how can I reproduce the error when I embed another installer. I tried on many ways, and I could not do it. I know that in my example the error flag wont be set as far as exit code is kept in $0 variable, but at the same time, there is a sentence above: "(and only sets the error flag if an error occurs; if an error occurs the contents of the user variable are undefined)" so my question is how can I get such an error that my $0 variable will be undefined and I errorflag will return error ? ClearErrors ExecWait '"$EXEDIR\Windows\Server\test.exe"' $0 IfErrors 0 next1 MessageBox MB_OK "The installation has finished unexpectedly. Installation of Server component will be aborted." Quit next1: MessageBox MB_OK $0 |
![]() |
![]() |
![]() |
#2 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 923
|
That depends on the type of installer you are running. Generally ExecWait is used for console applications.
For anything with a GUI, usually you have to pass some flags with the command so that the process being launched runs in automatic mode, usually there is a silent flag you can add to do this. The error being talked about here is if the ExecWait command fails, it's not about the process being run. You should be checking $0 for the processes return value to see if it succeeded or not. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#3 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
PHP Code:
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|