Archive: Output redirection to a 3 respective files.


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 ??


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??


Use:

ExecWait '"$1" /C "$INSTDIR\some.exe" 1> stdout 2> stderr' $0


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..


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.


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?


Use nsExec plugin.


/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


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?


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?