Hello to everybody,
I have a problem with installscript.js in Qt Installer Framework.
I need to create a mysql database using the command:
mysql -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS dbbase"
so I add this line in installscript.js:
component.addElevatedOperation("Execute", "cmd","/C","mysql","-uroot","-ppassword", "-e", "\"CREATE DATABASE IF NOT EXISTS dbbase\"");
component.addElevatedOperation("Execute", "cmd","/C","mysql","-uroot","-ppassword", "-e", "\"CREATE DATABASE IF NOT EXISTS dbbase\"");
To copy to clipboard, switch view to plain text mode
if I launch this command from terminal, all works correctly.
On the other hand, during installation process, I have this error message:
Error during installation process (mariadb.com): Execution failed(Unexpected exit code: 1):"cmd /C mysql -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS dbbase""
In other parts of code the call of "Execute" doesn't cause any problem... perhaps it could be a syntax error "-e", ""CREATE DATABASE IF NOT EXISTS dbbase" ?
Thanks!
Bookmarks