MySQL
I have searched this forum and the NSIS wiki and everything that I can think of for an answer to this problem.
What I need to do is connect to a mysql database and create tables based on a .sql or .bat file. What I have so far is just me trying to do something with the database, connecting, a select query, and then exiting.
This is the contents of the bat file:
mysql mysql
SELECT * FROM user
quit
This works perfectly in cmd.exe when I execute it out of NSIS. But when I attempt to execute it as a part of an NSIS installer it freezes the installer and I have to force quit.
This is the contents of the .nsi file which includes as many plugins or code that I could find that could possibly do this job.
Name "${APP_NAME} Test"
OutFile "${APP_NAME}.exe"
Section ""
;nsExec::ExecToLog '"mysql -u root --force SAM" < bat'
;nsExec::ExecToLog '"$0" /C "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe" -uroot < "C:\Documents and Settings\Hess Smith\schema.sql"'
ExecDos::exec "$EXEDIR\mysql.bat" "" "$EXEDIR\execdos.log"
POP $0
MessageBox MB_OK "Exit Code $0"
SectionEnd
Does anybody know of code that can accomplish what I need? Does anybody see any mistakes in my code that could be holding up the installer?
Thank you all who might be of help to me.
Hess Smith