Page 1 of 1
Save cmd output to a text file...?
Posted: 22 Jul 2016 06:02
by mingolito
Hi guys I need to redirect output of a *.exe files in a text file, I tried in every possible way but I did not succeed.
If I run the command "Test.exe -h" is correctly displayed in the cmd window, if I try to copy the contents to a text file does not get anything.
This commands without success:
Code: Select all
Test.exe -h > C:\Out.txt
Test.exe -h >> C:\Out.txt
Test.exe -h 2> C:\Out.txt
Test.exe -h 2>> C:\Out.txt
(Test.exe -h)2> C:\Out.txt
Test.exe -h> C:\Out.txt
Test.exe -h &> C:\Out.txt
Test.exe -h &>> C:\Out.txt
This file..:
I hope someone is able to solve the problem.
Thanks..
Re: Save cmd output to a text file...?
Posted: 22 Jul 2016 06:15
by misol101
Seems like the program doesn't write to sdtout or stderr. It could be writing straight to the buffer with e.g. a call to WriteConsoleOutput, in which case you cannot redirect the output.
Re: Save cmd output to a text file...?
Posted: 22 Jul 2016 06:36
by mingolito
OK Bro..., work for me any solution that you know to call the command and save the output to a text file.
I also tried it in VB direct the output into a textbox, and I get the same problem.
If you know any other solution that can be adapted to the application, for me I fine.

Re: Save cmd output to a text file...?
Posted: 22 Jul 2016 06:48
by Squashman
You better have a good explanation as to why my anti-virus is flagging that executable as a TROJAN.
Re: Save cmd output to a text file...?
Posted: 22 Jul 2016 07:00
by misol101
Squashman wrote:You better have a good explanation as to why my anti-virus is flagging that executable as a TROJAN.
Hmmm... ouch! And here I was, trying to find a solution for mr mingolito. Fortunately I didn't run the program though.
Re: Save cmd output to a text file...?
Posted: 22 Jul 2016 07:03
by Squashman
misol101 wrote:Squashman wrote:You better have a good explanation as to why my anti-virus is flagging that executable as a TROJAN.
Hmmm... ouch! And here I was, trying to find a solution for mr mingolito. Fortunately I didn't run the program though.
Neither did I. My Anti-Virus picked it up immediately after I downloaded it.
EDIT: (ReOpen)Save cmd output to a text file (Closed)
Posted: 22 Jul 2016 08:18
by mingolito
Boys is not a virus, your antivirus can see him as a false positive, I have not posted to give problems or to waste time but to find a solution to the problem.
The files is a compression program "MSC (media streams compressor)".
http://krinkels.org/resources/msc-media-streams-compressor.4/Code: Select all
MSC [media streams compressor] v0.0.6.4 by ProFrager
Special thanks for assistance to kampaster ;)
msc.exe [command] [-options] infile [outfile]
[commands]:
c : default command. It scans and compresses the data. Requires an
output file.
s : it simply scans input file and displays all that was found to
console. Don't require an output file.
e : extracts on the disk all the files that were found. Don't require
an output file.
ec : extracts on the disk only ready for compression files
(DDS [DXT/RAW], BMP, WAV [PCM], MPEG Layer III) Don't require an
output file.
i : insert files from the disk back into archive. Don't require an
output file.
[options]:
-h, -? : show this help
-log=xxx : MSC saves all output also to log file "xxx"
[options.search_options]:
-wav=N : [N=1] disable(0) or enable(1) RIFF WAVE detection
-raw=N : [N=0] disable(0),enable(1) or advanced(2) raw audio data detection
In the options -mp3 and -raw only one can be equal to 2
-bmp=N : [N=0] disable(0) or enable(1) BMP detection
-dds[DXT,RAW]=N : [DXT=1, RAW=0] disable(0) or enable(1) DXT or RAW DDS
detection
-mp3=N : [N=1] disable(0),enable(1) or nonstandart(2) mp3 detection
-minMP3Frames=N : [N=20] set a minimum number of frames to detect MP3
-maxMP3Block=N : [N=1m] If detected size of mp3 is more than specified, the
file is split into pieces. This is needed to "smooth" unpacking.
-lzma:x:y:... : sets lzma-weighting compression options (bt4/hc4, lc, lp, pb,
fb, mc). Used to determine the best result in DXT DDS (-dxt=2) and
RAW audio (-raw=2). Default values for options:
bt4:lc3:lp0:pb2:fb32:mc32
[options.compress_options]:
-bmf=N[s]: [N=9] compression lvl of bmf packer (1-9). s - optional parameter
that specifies the enhanced compression level, but greatly reduces
the processing speed. This option applies only to
RAW DDS and BMP
-frog=N : [N=off] compression lvl of OptimFrog WAVE packer (1-9). Used only
for PCM WAV and RAW audio.
-tak=N : [N=9] compression lvl of TAK WAVE packer (1-9). Available only TAK
or OptimForg compression, so setting any value one of them results
to resetting the second. This option applies only to PCM WAV and
RAW audio
-dxt=N : [N=2] disable(0), enable(1) DDS DXT optimization, or
lzma-weighting(2) model for optimization results.
[options.size_filter_options]:
-maxDDS[RAW,DXT,MIP]=N : set a maximum size of the processed DDS for a
specific type of operation
-minDDS[RAW,DXT,MIP]=N : set a minimum size of the processed DDS for a
specific type of operation
-max[BMP,WAV,RAW]=N : set a maximum size of the processed BMP, WAVE or RAW
audio file
-min[BMP,WAV,MP3,RAW]=N : set a minimum size of the processed BMP, WAVE, MP3
or RAW audio file
-f : [off] disable size filters
[options.other options]:
-t=N : [N=0] number of threads for the compression. 0 - auto;
1,2 or 4 - points directly to the number of threads
-v : [off] detailed messages about all performed operations
-vv : [off] displays also information about RAW audio detection
Examples:
msc.exe -bmf=9 -dxt=1 data.pak data.msc
msc.exe c -bmf=9s -dxt=2 -lzma=bt4:lc8:fb128 -maxDDSMIP=90kb tex.zip dat.msc
msc.exe c -bmf=9 -dxt=2 -lzma=hc4,lc8,lp2,pb2,fb128 tex.zip data.msc
msc.exe c -mp3=2 -tak=5 audio.dat out.msc
msc.exe s -vv pak01_009.vpk
msc.exe e -v Codex_BIOGame_S_INT.afc
I ask the moderator to gently reopen the discussion closed .
