0

Following line in my nsis script is returning 7 :

ExecWait '"$mysqlfolder\bin\mysqldump" --user=$MySQLUser --password=$MysqlPassword --execute="tcm > D:\db_test.sql"' $2

I would like to know whats wrong with it.

Seki
  • 11,135
  • 7
  • 46
  • 70
jai shukla
  • 211
  • 1
  • 2
  • 15

1 Answers1

1

Are you sure the exit code is not from mysqldump? You could verify this by running Process Monitor.

In this case the problem could be the stdout redirection (>), this type of redirection is implemented in cmd.exe so unless --execute calls cmd.exe it is not going to work.

If you want to capture the output (of the "root" child process) you have two options:

  • Prefix your command line with cmd.exe /C (Use ReadEnvStr "COMSPEC" if you need to support Win9x)
  • Use one of the exec plugins that will capture the output.
Community
  • 1
  • 1
Anders
  • 97,548
  • 12
  • 110
  • 164