Post a reply to the thread: Running MySQL.exe on setup to create a database
Click here to log in
What's the name of our main installation product (in uppercase letters), directly followed by the current year?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
Re: Running MySQL.exe on setup to create a database Hi Andy, Perfect! Friedrich
Re: Running MySQL.exe on setup to create a database
Re: Running MySQL.exe on setup to create a database Hi Friedrich Hey, it' working right now. Thank you! You were right to put the cmd /c in front of the command line. Whats a little bit strange is, is the fact that it doesn't work if you call it with "cmd.EXE /c" or "[SYS]\cmd.exe /c". It has to be "cmd /c". Andy
Re: Running MySQL.exe on setup to create a database Hi Andy, IMO, "Run Command Line..." should also work for you. But you have commands in your command line that are typical for a "command interpreter" call. For example, "<" is a redirection operator and only available in CMD.EXE. Neither the CreateProcess nor the ShellExecuteEx Windows API have any idea what "<" means. So just put cmd /c in front of your original command line and you should be done. This will then launch the command interpreter (CMD.EXE). Does this help? Friedrich
Re: Running MySQL.exe on setup to create a database Originally Posted by linder BTW, perhaps your intention was to run the command interpreter? In this case you have to use cmd /c in front of your command. Friedrich Yes, exactly. Sorry about that. That means i have to do launch the mysql.exe with "run programm"? Ok, i'll give it a try. Thank you for your advice. Now, all i have to do is to find out, how to pass the parameters correctly to the call. Thanks! Andy
Re: Running MySQL.exe on setup to create a database BTW, perhaps your intention was to run the command interpreter? In this case you have to use cmd /c in front of your command. Friedrich
Re: Running MySQL.exe on setup to create a database Andy, I don't think that your command line is correct at all. Please note that a Windows application (e.g. your setup.exe) makes use of CreateProcess or ShellExecuteEx Windows APIs to launch another program. Friedrich
Running MySQL.exe on setup to create a database Hello, I've searched the forum and couldn't find what I was looking for. My problem is running a MySQL script after the setup to create a database and the tables. I tried it with the "run commandline" and the "run programm" function but none of them worked. To execute the script I use mysql.exe with the parameters -u %USER% -p %PASSWORD% -h %SERVER% < "script.sql" If I run this line directly into the cmd it works as expected and the database is created but not so out of the installer. Can you give me a hint, what i'm doing wrong? I use the SetupBuilder v7.1 Dev on WinXP The command line string is "%_SB_INSTALLDIR%\MySQL\mysql.exe" -u %USER% --p %PASSWORD% -h %SERVER% < "%_SB_INSTALLDIR%\MySQL\CreateDatabase.sql". I don't know what to do or what i could try. Thanks! Andy
Running MySQL.exe on setup to create a database
Forum Rules