Skip to content
⌘ NSIS Forum Archive

Execwait

5 posts

Guest#

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?
Takhir#
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.
Guest#
Cool Genial

THANK YOU

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

MAny many thanks Takhir
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.