Here is my .nsi code to try to execute them:
;Output File Name
OutFile "sfox.exe"
;The Default Installation Directory
InstallDir "C:\Documents and Settings\Hess Smith\Desktop\SAM"
!include "MUI.nsh"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Section ""
SetOutPath $INSTDIR
;Put all of the .SQL files into a temp directory
File "C:\Documents and Settings\Hess Smith\Desktop\SFR\installer\sam2\installer files\sql\tables.sql"
;SQL Execute 1
nsExec::ExecToStack 'cmd /C "C:\Program Files\MySQL\MySQL Server 4.1\bin\mysql.exe" -uroot -pstrege -hlocalhost -P3306 < "$INSTDIR\tables.sql"'
;SQL Execute 1
Exec '"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysql.exe" -uroot -pstrege -hlocalhost -P3306 < "$INSTDIR\tables.sql"'
SectionEnd Here is my tables.sql file that it downloads and executes.# Generation Time: Dec 07, 2002 at 10:54 PM
# Server version: 3.23.52
# PHP Version: 4.2.3
# Database : `SAMDB`
# --------------------------------------------------------
#
# Table structure for table `category`
#
use sam;
CREATE TABLE category (
ID mediumint(9) NOT NULL auto_increment,
name varchar(100) NOT NULL default '',
parentID mediumint(9) NOT NULL default '0',
levelindex tinyint(4) NOT NULL default '0',
itemindex mediumint(9) NOT NULL default '0',
PRIMARY KEY (ID),
UNIQUE KEY name (name)
) TYPE=MyISAM; It pops up a command prompt and it appears that it is doing something, but it is moving so fast i can't read it. Then it exits. But it isnt affecting the database.Does anybody have any ideas?? 🧟