When you open Command Prompt and position it on your preferred location on the screen, the setting is not retained. Also, when you resize the Command Prompt window and close it, the setting is not saved. This system managed positioning annoys many users who prefer uniformity in every aspect of the user interface. This post tells you how to customize the default Command Prompt window size (width & height) and set its default position in terms of screen coordinates.
You can customize a Command Prompt window’s appearance by changing its window size, position, font, and colors. You can save these settings independently for each Command Prompt shortcut so that you can have custom settings for different tasks. Also, you configure a global default window size, position, and font settings, which will apply when you launch Command Prompt window using other means — for example, when you run
Set Command Prompt Default Window Size & Position for a Specific Shortcut
To customize a Command Prompt window size and position for a particular shortcut, use these steps:
- Right-click on the Command Prompt shortcut, and click Properties. Alternately, double-click the shortcut to launch Command Prompt. Right-click on the Command Prompt title bar and click Properties.
- Click on the Layout tab.
- Change the Window size and Window Position settings in that tab. As you alter the Width, Height, Left, and Top values, you can see the Window preview which will help you set the desired size and position.
Note that you’ll need to first uncheck the Let system position window option setting to input custom values.
- Click OK. Changes made here affect all future Command Prompt sessions launched from that particular shortcut.
Set Command Prompt Global Default Window Size & Position
- Open a Command Prompt window by running cmd.exe from the Start Run dialog. In Windows 8 and Windows 10, you can right-click Start, and click Command Prompt.
Difference between “Properties” and “Defaults” options
Right-clicking on the Command Prompt window title offers access to the Properties dialog box. (If Command Prompt is running in full-screen mode, press Alt + Enter to switch to window display.) Changes you make here affect the current session, and all future sessions launched only from that shortcut. The changes made are saved inside that particular shortcut (.lnk) file, instead of the registry.
Right-clicking on the Command Prompt window title and choosing Defaults from the Control menu lets you make changes that will not affect the current session but instead will affect all future sessions (except for those launched from a shortcut whose properties have been customized). These changes also affect future sessions in character-mode, MS-DOS-based applications that do not have a Program Information File (PIF) and do not store their own settings. This setting is saved in the registry.
- Right-click on the Command Prompt title bar, and click Defaults. Select the Layout tab and configure the size and position accordingly, as explained earlier.
The changes you make here affect all future sessions (except for CMD windows launched from a shortcut whose properties have been customized). These changes also affect future sessions in character-mode, MS-DOS-based applications that do not have a .PIF file and do not store their own settings. The global settings are used when you launch cmd.exe directly or via the Win + X menu.
The global default settings are stored in the following per-user registry key. You can export the key to a .reg file and apply the settings to other systems.
Important: If you make any changes to the Command Prompt window that was opened it directly (via the Run dialog, as opposed to a desktop shortcut), the customized settings will be saved in the following registry key instead:
The above key overrides the defaults in
HKEY_CURRENT_USER\Console when you open Command Prompt directly (not from a shortcut.)
To reset to default settings, the subkey
%SystemRoot%_system32_cmd.exe can be deleted.
Reset Command Prompt Settings to Windows Default
Windows Registry Editor Version 5.00 ;Reset Command Prompt settings to default [-HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] [HKEY_CURRENT_USER\Console] "CtrlKeyShortcutsDisabled"=dword:00000000 "CursorColor"=dword:ffffffff "CursorSize"=dword:00000019 "DefaultBackground"=dword:ffffffff "DefaultForeground"=dword:ffffffff "EnableColorSelection"=dword:00000000 "ExtendedEditKey"=dword:00000001 "ExtendedEditKeyCustom"=dword:00000000 "FaceName"="__DefaultTTFont__" "FilterOnPaste"=dword:00000001 "FontFamily"=dword:00000000 "FontSize"=dword:00100000 "FontWeight"=dword:00000000 "ForceV2"=dword:00000001 "FullScreen"=dword:00000000 "HistoryBufferSize"=dword:00000032 "HistoryNoDup"=dword:00000000 "InsertMode"=dword:00000001 "LineSelection"=dword:00000001 "LineWrap"=dword:00000001 "LoadConIme"=dword:00000001 "NumberOfHistoryBuffers"=dword:00000004 "PopupColors"=dword:000000f5 "QuickEdit"=dword:00000001 "ScreenBufferSize"=dword:23290078 "ScreenColors"=dword:00000007 "ScrollScale"=dword:00000001 "TerminalScrolling"=dword:00000000 "TrimLeadingZeros"=dword:00000000 "WindowAlpha"=dword:000000ff "WindowSize"=dword:001e0078 "WordDelimiters"=dword:00000000 "ColorTable00"=dword:00000000 "ColorTable01"=dword:00800000 "ColorTable02"=dword:00008000 "ColorTable03"=dword:00808000 "ColorTable04"=dword:00000080 "ColorTable05"=dword:00800080 "ColorTable06"=dword:00008080 "ColorTable07"=dword:00c0c0c0 "ColorTable08"=dword:00808080 "ColorTable09"=dword:00ff0000 "ColorTable10"=dword:0000ff00 "ColorTable11"=dword:00ffff00 "ColorTable12"=dword:000000ff "ColorTable13"=dword:00ff00ff "ColorTable14"=dword:0000ffff "ColorTable15"=dword:00ffffff "CurrentPage"=- "WindowPosition"=-
To reset Command Prompt preferences to defaults:
- Please copy the above contents and paste it into Notepad.
- Save the file with
- Double-click the .reg file to apply the settings.
The default colors, font face, font family, window size, position (system managed), and other settings are restored. As stated earlier, this is a per-user setting.