Skip to content
⌘ NSIS Forum Archive

cannot read file :(

2 posts

cakirhal#edited

cannot read file :(

Hi

I have a script that prompts user some values and execute a file's content like this:

SetOutPath "$TEMP"
SetOverwrite on
File 'file.sql'

ExecWait '"$DESKTOP\mysql.exe" --user=$username --password=$password --execute="$TEMP\file.sql" $db_name'

This script fails. What is the problem?

Thanks.
cakirhal#
Re: cannot read file from $TEMP 🙁

Originally posted by cakirhal
Hi

I have a script that prompts user some values and execute a file's content like this:

SetOutPath "$TEMP"
SetOverwrite on
File 'file.sql'

ExecWait '"$DESKTOP\mysql.exe" --user=$username --password=$password --execute="$TEMP\file.sql" $db_name'

This script fails. What is the problem?

Thanks.
Sorry, I solved. "source" statement was missing with in my ExecWait string. It must be like:

ExecWait '"$DESKTOP\mysql.exe" --user=$username --password=$password --execute="source $TEMP\file.sql" $db_name'

Thanks