I have read over a few posts that touch on my problem, but for some reason or another (most likely human error) I can't get it to work. I am running an NSIS script that includes the setup of a MySQL database, table and user. I do this via SQL run from the cmd line. See below.
mysql -uroot < "C:\Documents and Settings\username\Desktop\appName\install\mysql\scripts\create_mysql_database.sql" In my NSIS script, I run this from a function. see below.Function setupSchema
Exec 'mysql -uroot < "${SRC}\mysql\scripts\create_mysql_database.sql"'
FunctionEnd I have also tried various commands instead of Exec (NSExec::ExecToStack, nsExec::ExecToLog, ExecWait) and messed around with the command itself(including 'cmd' or 'command',giving a full path to 'mysql' with full quotes,etc).Any idea why this would be working? I did review some previous posts, but nothing seems to be working. By the way, MySQL is running when this is executed and I verified the SQL works when run manually.
Also, are there any debugging options or logging that I can use to see what's going on. I know all the commands are displayed during the install...but anything more is helpful.
Many thanks in advance.