How to get the execution stderr
Hi,
I'm currently facing a problem with the ExecWait function.
In my installer I have to invoke a number of deployed binaries.
I use an ExecWait call that looks like this :
ExecWait "$INSTDIR\mysql\bin\mysql.exe -u root < $INSTDIR\config\scripts\mysqlgrant.sql"
The problem is that I can see a shell window opening, and a bunch of error messages displayed, just before the window closes. Of course the closing is very fast, and I don't have the time to read any of the messages.
I tried to add a 2> $INSTDIR\myerr.log in the exec param, in order to re-direct the stderr and check the errors, but it did not help. The log file was empty.
I also tried to add && pause in the
exec line, hoping taht it would prevent the window from closing but without success.
Eventually I tried to put all these commands in a bat file, and make it exec, but was still unable to find the logs or the errors.
I also tried some variations of the exec line like :
ExecWait '"$INSTDIR\mysql\bin\mysql.exe" -u root < $INSTDIR\config\scripts\mysqlgrant.sql"'
or
'"$INSTDIR\mysql\bin\mysql.exe" -u root < "$INSTDIR\config\scripts\mysqlgrant.sql"'
without any success ...
So dos anyone have a suggestion on how to debug a case like this ?
Is there any function that would allow me to exec a program and get it's stout & stderr ?
Any help would be greatly appreciated !
Thanks