Sep 242013

Default Settings for Command Prompt

The default command prompt setting on Windows is pretty limited. Some limitation that I found while working on the command prompt is as follows…

  • Screen buffer size is very little. This means output of commands like ‘tree’ will not show up entirely in the command prompt. Once you scroll up you’ll not see the whole text. As a workaround you’ll have to redirect output to a text file.
  • Same with horizontal text, the text wraps around once the text touches the horizontal screen limit. I find this behavior annoying since this reduces readability.
  • Color is black and white. Its always cool to have different colors. I normally have dark red as background and white as foreground color.
  • Window size is limited. When you maximize command prompt it will only take half the screen size horizontally.
  • Its so painful to copy and paste. I want this feature to behave as in text editors like notepad. For e.g. just drag to select, instead of right clicking and selecting the “Mark” option.

After Customization of Command Prompt

Its very easy to customize our good old command prompt so that it stores more text vertically as well as horizontally. We can easily give good colors, better height and width etc. After customization this is how my command prompt looks in normal mode.

Command Prompt

Keep an eye on the scrollbar. The scrollbar thumbs are very small in size meaning they can scroll a lot more, which means more text. If you maximize the command prompt it occupies the entire screen as well.

Command Prompt Full Screen

If you look at the above output and the vertical scrollbar, I still have lots of screen buffer. If I scroll up I still see the command’s entire output. Isn’t this cool.

Copying and pasting is easy as well. Drag to select, right click on the selected area to copy and right click again to paste Smile. LOL that’s real cool. The selection is a free selection, always selects as a rectangle. See screenshot below…

Command Prompt with Selected Text

How to Customize Command Prompt

The whole customization lies in the command prompt’s system menu. Click on the dark icon at the far left corner, i.e. the system icon, of command prompt, select “Properties”. You should see a properties dialog popup.

To customize selection, copy, paste behavior check the “Quick edit” checkbox…

Command Prompt Properties Dialog: Options

To customize Font select appropriate fonts on the “Font” tab. This is how mine looks.

Command Prompt Properties Dialog: Font

To customize color, select appropriate colors in the “Colors” tab. This is how mine looks…

Command Prompt Properties Dialog: Colors

Please note there is a screen background and a popup background. Also there is a “Screen Text” and “Popup Text”. Screens stands for command prompt background, while popup stands for popup command dialogs, for e.g. press F7, the command history ‘popup’ window pops up…

Command Prompt Popup Dialog

Now comes my favorite, increasing the screen buffer size, or increasing the text buffer size of command prompt. This setting controls how much text the command prompt can hold. Please select the layout tab in the command prompt..

Command Prompt Properties Dialog: Layout

I’ve set the “Screen buffer Size” field values to high values so that it can hold as much text as possible. You can set your own values based on your preferences.

Hope this helps you in some way. Smile

Sep 122013

View list of installed device drivers

To list all the drivers on your box use the DOS command DriverQuery.


C:\>driverquery /?

DRIVERQUERY [/S system [/U username [/P [password]]]]
[/FO format] [/NH] [/SI] [/V]
Enables an administrator to display a list of installed device drivers.

Parameter List:
/S     system           Specifies the remote system to connect to.
      /U     [domain\]user    Specifies the user context
under which the command should execute.
      /P     [password]       Specify the password for the given
user context.
      /FO    format           Specifies the type of output to display.
Valid values to be passed with the
switch are “TABLE”, “LIST”, “CSV”.
      /NH                     Specifies that the “Column Header”
should not be displayed. Valid for
“TABLE” and “CSV” format only.
      /SI                     Provides information about signed drivers.
      /V                      Displays verbose output. Not valid
for signed drivers.
      /?                      Displays this help message.

DRIVERQUERY /S ipaddress /U user /V
DRIVERQUERY /S system /U domain\user /P password /FO LIST

Further Interesting things to do…

DriverQuery and the DOS Find command makes a powerful pair, think about following questions…

  1. How to get a list of device drivers that are disabled. Here’s the command
    DriverQuery /V | find /I “Disabled”
    DriverQuery: List of disabled drivers
  2. How to get a list of file system drivers. Here’s the command
    DriverQuery /v | find /I “File System”
    DriverQuery: List of File System drivers
  3. How about usb drivers? Here’s the command…
    DriverQuery /v | find /I “usb”
    DriverQuery: List of USB drivers

Please note the above filtering is based on string parsing you might some false entries as well, so take a closer look at the output before using them.

You can view remote system drivers as well. Pass in the remote machine name, I guess you should be an admin on the remote machine to get this going.

Can you be used in batch files as well.