View Full Version : how to retrieve error message of iscab.exe

03-19-2008, 12:02 PM
hi how can i get the message return by iscab.exe ?

iscab.exe "C:\RBM\Spartan\Install\Released\cd\install\Basecab\data1.cab" -i"
C:\RBM\Spartan\Install\Released\cd\Setup\Client_local.ini" -x > "c:\testtest.txt"

Error: Item not found in the collection: 'WrtBlk32x.dll'

i tried passing

> "c:\testtest.txt"

though the text file was created, it doesn't contain any text inside. I'm expecting that

Error: Item not found in the collection: 'WrtBlk32x.dll'

will be created in testtest.txt file.


03-19-2008, 12:21 PM
Perhaps it's using stderr instead of stdout? If so, perhaps try this (with the extra bit at the end):

iscab zzz.cab -i zzz.ini -x > C:\test.txt 2>&1

03-19-2008, 09:49 PM
Cool!!!! It works!!!! Thanks so much

by the way what is the purpose of adding 2>&1 at the end of the command?

03-20-2008, 08:53 AM
My informal understanding is that even though they're both displayed at the command line, so-called stdout (standard output) and stderr (error-type output) are different streams, or handles. stdout is stream 1, stderr is stream 2, keyboard input (stdin) is stream 0...

The normal > redirect operator (as in iscab -args > output.txt) redirects (to a file, in this case) only stdout data; using that extra 2>&1 notation indicates to redirect stderr (stream 2) to stdout (stream 1) so the combined output will go to your file.

And after typing all that, I see Windows XP has a help topic "Using command redirection operators" that has a much better and more thorough explanation.