How to get verbose output in Winzip cmd line? - command

How can I display verbose output of the zipping process with winzip command line?

Related

Perl keeps flashing when running command Windows 10

I have installed Perl but every time I run a command it flash and goes away and does nothing, I have added it to Environment path and gave full permission to folder Perl64
edit regeristy in perl command c:\perl\bin\perl.exe %1 %*
when I run Perl -v I do get versions so I know it installed
It sounds like your command ran to completion and exited. Once the program exits, the console is closed.
Perhaps you are getting an error. You should run the program from the command line to see what errors you get.
You could also try associating the file with the following command:
cmd /c c:\perl\bin\perl.exe %1 %* & pause
(Untested)

AutoHotKey run command in background

I'm trying to run a command with AutoHotKey that I would normally run with cmd.exe. Here is the command:
pandoc -s "C:\input.txt" -o "D:\output.html"
This is how I do it in AutoHotKey:
#a::
run pandoc -s "C:\input.txt" -o "D:\output.html"
return
The only problem is that this opens up the a command prompt called "pandoc". Normally I'd just type in the command in cmd.exe and it would run without any hiccups or any windows opening. For this, however, that pandoc window shows up. Am I doing it correctly? Is there any easy way to suppress the window and run the command in the background?
Runs a program without opening a window. The program is "cmd.exe", the windows command shell. It is invoked with arguments "/c time /t", which outputs the current time. It redirects the output to "c:\t.txt"
program
#a::
run cmd /c time /t > c:\t.txt, c:\, hide
return
output
c:\>type c:\t.txt
14:28

Supressing 'File Created' output on 'create pfile' command in SQL*Plus

I'm using a Perl script to run SQL*Plus and then sending a command to the program to create a pfile from the SP file. I want the command to run without outputting anything to the terminal. Running sqlplus in silent mode (sqlplus -s) suppresses most of the terminal output when calling sqlplus, but creating the pfile still outputs a 'File created' to the terminal regardless. How can I suppress this output?
Running set feedback off will suppress the 'File created' output in the terminal. If you are running a SQL script when calling SQL*Plus, adding that line before the create pfile line will suppress the output as well.

How do I exit the command shell after it invokes a Perl script?

If I run a Perl script from a command prompt (c:\windows\system32\cmd.exe), how can I exit the command prompt after the script finishes executing.
I tried system("exit 0") inside the Perl script but that doesn't exit the cmd prompt shell from where the Perl script is running.
I also tried exit; command in the Perl script, but that doesn't work either.
Try to run the Perl script with a command line like this:
perl script.pl & exit
The ampersand will start the second command after the first one has finished. You can also use && to execute the second command only if the first succeeded (error code is 0).
Have you tried cmd.exe /C perl yourscript.pl ?
According to cmd.exe /? /C carries out the command specified by string and then terminates.
If you're starting the command shell just to run the perl script, the answer by Arkaitz Jimenez should work (I voted for it.)
If not, you can create a batch file like runmyscript.bat, with content:
#echo off
perl myscript.pl
exit
The exit will end the shell session (and as a side effect, end the batch script itself.)
You can start the program in a new window using the START Dos command. If you call that with /B then no additional window is created. Then you can call EXIT to close the current window.
Would that do the trick?
You can send a signal to the parent shell from Perl:
kill(9,$PARENT_PID);`
Unfortunately, the getppid() function is not implemented in Perl on windows so you'll have to find out the parent shell PID via some other means. Also, signal #9 might not be the best choice.

windbg: Command output to text file

How can I Save Output of a command in WinDbg to a Text File?
Start WinDbg from the command line using the -logo option:
windbg.exe -logo logfile.txt
That will get everything done logged to the file specified. You can find more details of the command line options here.
Or, if you are already in a debugging session, you can use the .logopen command to start logging. For more info on this command see here
Or you can click edit->Open/Close log file in the WinDbg GUI.
More info on log files is here.
You can use .logopen , all of the commands you input and response from windbg will be logged, and then use .logclose to flush the data into
You can also do this from the WinDbg gui 'Edit>Write Window Text To File...' if you find that easier.
To send the output of a specific command to a file, go and get Tee, (I use Tee.bat), put it into a directory covered by the Windows PATH environment variable (or add the directory you've put it in). Then use the following syntax from the WinDbg GUI to send the output of a command to a file
.shell -ci "<command>" tee <file>
.shell -ci "!gcroot 000002b56c414750" tee c:\path\out_01.log
There's an undocumented !! abbreviation of .shell. So you could just do:
!! -ci "!gcroot 000002b56c414750" tee c:\path\out_01.log
Background
You can run shell commands in the WinDbg GUI. The syntax is:
.shell [Options] [ShellCommand]
.shell -i InFile [-o OutFile [-e ErrFile]] [Options] ShellCommand
Here I found the solution to send the command output to the clipboard.
.shell -ci "<command>" clip
If you can send the output to clip, shouldn't it be possible to send it to a file, like so?
.shell -ci "<command>" > <file>
.shell -ci "!gcroot 000002b56c414750" > c:\path\out_01.log
Would be nice, but it does not work. In the MS docs I found this example.
.shell -ci "!process 0 7" perl.exe parsemyoutput.pl
So it is possible to send the output to an application. Just like the above example using clip. And that's where Tee came in. But you could use any other script or .exe which takes the output and stores it in a file or another place.