The Command Window

Many problems in Windows can best (or sometimes only) be resolved by commands entered in a Command window. You can start a Command window from the Run window, but don't confuse the two. (Note): If your computer is running Windows Vista or Windows Seven, then you'll want to refer to The Command Window, In Windows Vista, for additional instruction.



A Command Window (the title may vary, widely)


  • Hit the Start button.
  • Hit the Run selection.
  • Type "cmd" into the Run window (less the ""), and hit Enter.
  • A new window, with varying title, will open.
  • Now type whatever you need, into the Command Prompt window, with the cursor positioned for you after the ">", and hit the Enter key after each command.
  • Remember to allow for the Path, and the location of the program that you're running, if necessary.
  • Close the window when convenient.


If you run ipconfig, for instance, as

C:\Documents and Settings\YourAccount>ipconfig /all

you will get the ipconfig output there in the command window. This is good to look at briefly, but isn't very good to copy. Copying from the command window can be done, but will be hard to read.

Redirected Output
By redirecting the output, you can view it and / or copy it in a more convenient way, so it's suitable for posting online. Instead of typing

C:\Documents and Settings\YourAccount>ipconfig /all

type

C:\Documents and Settings\YourAccount>ipconfig /all >c:\ipconfig.txt


With the latter command, instead of getting the ipconfig output there in the command window, all you'll see in the command window is another "C:\>". Then, type

C:\Documents and Settings\YourAccount>notepad c:\ipconfig.txt

and Notepad will open with the ipconfig output in a more viewable, and copyable, format.

(Note): If you get an error "Access denied" when you run a command and redirect the output, you may be attempting to redirect output into a file in a folder that you aren't permitted to write into. If you're doing this in Vista, or any other well secured system, this may happen.

Try redirecting into a folder that you are permitted to write into. If the command window opens in "C:\Documents and Settings\YourAccount", just redirect there.

C:\Documents and Settings\YourAccount>ipconfig /all >ipconfig.txt

then
C:\Documents and Settings\YourAccount>notepad ipconfig.txt


Concatenated, Redirected Output
Do you need the output from two commands, run one after the other, presented in a text file? Be sure to concatenate the output from the second onto the first, don't overlay the first.

C:\Documents and Settings\YourAccount>browstat status >c:\browstat.txt
C:\Documents and Settings\YourAccount>browstat listwfw pchucklan >>c:\browstat.txt

Note the ">>" in the second command; that concatenates the output from the second command, after the output from the first command.

Finally, type

C:\Documents and Settings\YourAccount>notepad c:\browstat.txt

and Notepad will open with both browstat outputs, one following the other, in c:\browstat.txt.

>> Top

0 comments: