- NSIS Discussion
- Output redirection to a 3 respective files.
Archive: Output redirection to a 3 respective files.
Sharad
21st May 2004 13:23 UTC
Output redirection to a 3 respective files.
Hi,
I want to put three different kinds of output(lik standard output, error and log) in 3 respective file(say, stdout,stderr and log). How can i do this using script?
I searched the forum and found :
1. nsExec - plug-in
2. ExpandEnvStrings $1 %COMSPEC%
ExecWait '"$1" /C "$INSTDIR\some.exe" > "somefile"' $0
But how can i use these commands to solve my problem ??
Sharad
25th May 2004 12:24 UTC
I think no one can understand the problem.
I m still in search of the solution.
Try to put it again...
I have some System.out.println() and System.err.println() in my java files.
Now, since these outputs will by default display on Command prompt,insteed, i need them to be appended to two different files depending upon the type of output.
So, i think i need to specify both the file names in the scripts itselt but dont know HOW ??
If anyone can help now??
kichik
25th May 2004 12:44 UTC
Use:
ExecWait '"$1" /C "$INSTDIR\some.exe" 1> stdout 2> stderr' $0
Sharad
25th May 2004 13:11 UTC
yeh, it creates two files but doesn't cantain the correct content.
stdout doesn't contain output from 'out.println' insteed it contains the log output that i dont want in that.
stderr doesn't contain anything..
kichik
25th May 2004 13:19 UTC
Worked for the program I tested on, maybe it's something with Java? Try testing it from the command prompt and with non-Java programs.
Sharad
2nd June 2004 11:02 UTC
It worked. Thanks a lot.
But I don't want to open that command prompt.
Is there any way to hide that prompt ?
What does /C option do?
deguix
2nd June 2004 12:12 UTC
Use nsExec plugin.
Vytautas
2nd June 2004 15:48 UTC
/C options tells the command-line interpreter to run the current command and exit rather that launch a new instance of the command prompt.
Vytautas
Sharad
3rd June 2004 11:28 UTC
Can nsExec do the same thing what the following command does (without opening command prompt)?
ExecWait '$1 /C "$INSTDIR\some.exe" 1> stdout 2> stderr' $0
I doubt!!
To send .err to stderr and .out to stdout, how can i use
nsExec::ExecToStack ?
Please suggest?
Sharad
3rd June 2004 13:45 UTC
Can nsExec do the same thing what the following command does (without opening command prompt)?
ExecWait '$1 /C "$INSTDIR\some.exe" 1> stdout 2> stderr' $0
I doubt!!
To send .err to stderr and .out to stdout, how can i use
nsExec::ExecToStack ?
Please suggest?