cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vvatclor
Level 3

how to retrieve error message of iscab.exe

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.

thanks.
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

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
0 Kudos
vvatclor
Level 3

Cool!!!! It works!!!! Thanks so much

by the way what is the purpose of adding 2>&1 at the end of the command?
0 Kudos
RobertDickau
Flexera Alumni

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