Archive: Execwait


Execwait
I did an install including MySQL 4.1.
After the installation of MySQL I launch the install of the DB of the application, but this part of the installer doesn't work. The ExecWait command look like this:

ExecWait '"C:\Program Files\mysql\MySQL Server 4.1\bin\mysql.exe" -hlocalhost -uroot -P6808 -p2oo5 < "U:\Database Development\MGIS Database\UPGRADE\Project\install\UploadDB.bat"' $0

I use a batch file in which are listed the SQL command for setting up my DB.
This command line works weel on the shell, but not at all in the NSI script. What is wrong?


Try to use ExecDos or nsExec plugin.
Or see here and here same discussion.


You can test this with cmd /C at the beginning of the command line


ReadEnvStr $0 "ComSpec"
ExecWait '$0 /C "C:\Program Files\mysql\MySQL Server 4.1\bin\mysql.exe" -hlocalhost -uroot -P6808 -p2oo5 < "U:\Database Development\MGIS Database\UPGRADE\Project\install\UploadDB.bat"' $0

or ExecCmd plug-in (2000, XP and later). this thread also may help.

Cool Genial
THANK YOU

This is what I was looking for since one week . My script is working fine now.

MAny many thanks Takhir


;) But please note, that on Win95/98 exit code ($0 in your script) may be incorrect. For my test app.exe that hardly coded to exit with 5, I always see 0 on Win98 in the ExecWait. This looks like command.com exit code.