If I manually try the following from the command line, it works just fine. The commands in the batch file are executed.
Here are a few things which I've unsuccessfully tried. Either I get an error about the ODBC user denied and didn't specify a password or a just the standard MySQL help screen.
E:\mysql\bin\mysql.exe --user=root --password=cacti --database=cacti < %TEMP%\batch.txt
Why is MySQL so picky? I'm using this exact same format for executing other commandline programs.
ExecCmd::exec /TIMEOUT=5000 "$INSTDIR\mysql\bin\mysql.exe --user=root --password=cacti --database=cacti < $TEMP\batch.txt" ""
ExecDOS::exec '"$INSTDIR\mysql\bin\mysql.exe" --user=root --password=cacti --database=cacti < $TEMP\batch.txt' "" "$IISDIR\cacti\log\mysql_batch.txt"