|
|
#1 |
|
Junior Member
Join Date: Sep 2007
Location: Germany
Posts: 3
|
Hi,
I'm having troubles while using the nsexec plugin. You can reproduce the problem by using the following code: ReadEnvStr $R0 COMSPEC nsExec::ExecToLog '"$R0" /c "d:\test space\mysql" --version > d:\test_space\mysql_version.txt' This works perfectly fine, the output (in this case the version number of a mysql-binary is written in to the (log)-file mysql_version.txt. However, as soon as the output path for the logfile contains spaces, the code breaks. One would think that putting the log-file into quotes would cure the problem: nsExec::ExecToLog '"$R0" /c "d:\test space\mysql" --version > "d:\test space\mysql_version.txt"' However, now I'm getting: command "d:\test" cannot be found. Is that the intended behaviour? Any ideas how to overcome that? Of course I could choose directories without spaces, but I would like to write the logfile into $INSTDIR\mysql\logs, and $INSTDIR might have spaces in its path. Thanks for any clarification playa_negra |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
That's cmd.exe quotes processing working for you. Add if 1==1 at the beginning and it won't do that.
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
You can also test this with ExecDos plug-in. Also please do not skip executable file name extension, use mysql.exe
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Sep 2007
Location: Germany
Posts: 3
|
@kickik:
Thanks for your advice. I don't know why it works, but it works. @Takhir: I saw you can capture STDOUT via log_file_name. Can you capture STDERR, too? Thanks playa_negra |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Stderr capture is possible, but not in current release.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|