Skip to content
⌘ NSIS Forum Archive

Execution with ouput redirection

3 posts

galevsky#

Execution with ouput redirection

Can't work :


ReadEnvStr $0 "COMSPEC"
nsExec::Exec '$0 /c "$1\bin\mysql --user=root --password=root --execute=\"SELECT version();\"" > $TEMP\foo.txt'
nor


ReadEnvStr $0 "COMSPEC"
Execwait '$0 /c "$1\bin\mysql --user=root --password=root --execute=\"SELECT version();\"" > $TEMP\foo.txt'

The foo.txt file exists, but empty. $1 is the right path. If I launch the command in a shell, it is working good.

Any idea ?

Thanks
Gal'