{"id":5778,"date":"2017-11-02T11:24:20","date_gmt":"2017-11-02T05:54:20","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=5778"},"modified":"2023-07-31T17:58:04","modified_gmt":"2023-07-31T12:28:04","slug":"set-cmd-prompt-default-window-size-position","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/set-cmd-prompt-default-window-size-position\/","title":{"rendered":"How to Set Command Prompt Default Window Size and Position"},"content":{"rendered":"<p>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 &amp; height) and set its default position in terms of screen coordinates.<!--more--><\/p>\n<p>You can customize a Command Prompt window&#8217;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 &#8212; for example, when you run <code>cmd.exe<\/code>\u00a0directly.<\/p>\n<h2>Set Command Prompt Default Window Size &amp; Position for a Specific Shortcut<\/h2>\n<p>To customize a Command Prompt window size and position for a <strong>particular shortcut<\/strong>, use these steps:<\/p>\n<ol>\n<li>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.<\/li>\n<li>Click on the Layout tab.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5781\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/cmd-default-size-position-3.png\" alt=\"command prompt layout and size defaults\" width=\"701\" height=\"527\" \/><\/li>\n<li>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.<br \/>\n<em>Note that you&#8217;ll need to first uncheck the <strong>Let system position window option<\/strong>\u00a0setting to input custom values.<\/em><\/li>\n<li>Click OK. Changes made here affect all future Command Prompt sessions launched from that <strong>particular<\/strong> shortcut.<\/li>\n<\/ol>\n<h2>Set Command Prompt Global Default Window Size &amp; Position<\/h2>\n<ol>\n<li>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.<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5779\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/cmd-default-size-position-2.png\" alt=\"command prompt layout and size defaults\" width=\"700\" height=\"250\" \/>\n<div class=\"qt\">\n<h4>Difference between &#8220;<strong>Properties&#8221;<\/strong> and &#8220;<strong>Defaults&#8221;<\/strong> options<\/h4>\n<p>Right-clicking on the Command Prompt window title offers access to the <strong>Properties<\/strong> dialog box. (If Command Prompt is running in full-screen mode, press <kbd>Alt<\/kbd> + <kbd>Enter<\/kbd> to switch to window display.) Changes you make here affect the current session, and all future sessions launched only from that shortcut. The <strong>changes made are saved inside that particular shortcut (.lnk)<\/strong> file, instead of the registry.<\/p>\n<p>Right-clicking on the Command Prompt window title and choosing <strong>Defaults<\/strong> from the Control menu lets you make changes that will not affect the current session but instead will affect all future sessions (<strong>except<\/strong> 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. <strong>This setting is saved in the registry<\/strong>.<\/p>\n<\/div>\n<\/li>\n<li>Right-click on the Command Prompt title bar, and click <strong>Defaults<\/strong>. Select the Layout tab and configure the size and position accordingly, as explained earlier.\n<div class=\"newline\">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 <kbd>Win<\/kbd> + <kbd>X<\/kbd> menu.<\/div>\n<\/li>\n<\/ol>\n<h4>Registry Key<\/h4>\n<p>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.<\/p>\n<pre>HKEY_CURRENT_USER\\Console<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5782\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/cmd-default-size-position-4.png\" alt=\"command prompt layout and size defaults\" width=\"700\" height=\"248\" \/><\/p>\n<p><strong>Important:<\/strong> 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:<\/p>\n<pre>HKEY_CURRENT_USER\\Console\\%SystemRoot%_system32_cmd.exe<\/pre>\n<p>The above key overrides the defaults in\u00a0<code>HKEY_CURRENT_USER\\Console<\/code> when you open Command Prompt directly (not from a shortcut.)<\/p>\n<p>To reset to default settings, the subkey <code>%SystemRoot%_system32_cmd.exe<\/code> can be deleted.<\/p>\n<hr \/>\n<h3>Reset Command Prompt Settings to Windows Default<\/h3>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n;Reset Command Prompt settings to default\r\n\r\n[-HKEY_CURRENT_USER\\Console\\%SystemRoot%_system32_cmd.exe]\r\n\r\n[HKEY_CURRENT_USER\\Console]\r\n\"CtrlKeyShortcutsDisabled\"=dword:00000000\r\n\"CursorColor\"=dword:ffffffff\r\n\"CursorSize\"=dword:00000019\r\n\"DefaultBackground\"=dword:ffffffff\r\n\"DefaultForeground\"=dword:ffffffff\r\n\"EnableColorSelection\"=dword:00000000\r\n\"ExtendedEditKey\"=dword:00000001\r\n\"ExtendedEditKeyCustom\"=dword:00000000\r\n\"FaceName\"=\"__DefaultTTFont__\"\r\n\"FilterOnPaste\"=dword:00000001\r\n\"FontFamily\"=dword:00000000\r\n\"FontSize\"=dword:00100000\r\n\"FontWeight\"=dword:00000000\r\n\"ForceV2\"=dword:00000001\r\n\"FullScreen\"=dword:00000000\r\n\"HistoryBufferSize\"=dword:00000032\r\n\"HistoryNoDup\"=dword:00000000\r\n\"InsertMode\"=dword:00000001\r\n\"LineSelection\"=dword:00000001\r\n\"LineWrap\"=dword:00000001\r\n\"LoadConIme\"=dword:00000001\r\n\"NumberOfHistoryBuffers\"=dword:00000004\r\n\"PopupColors\"=dword:000000f5\r\n\"QuickEdit\"=dword:00000001\r\n\"ScreenBufferSize\"=dword:23290078\r\n\"ScreenColors\"=dword:00000007\r\n\"ScrollScale\"=dword:00000001\r\n\"TerminalScrolling\"=dword:00000000\r\n\"TrimLeadingZeros\"=dword:00000000\r\n\"WindowAlpha\"=dword:000000ff\r\n\"WindowSize\"=dword:001e0078\r\n\"WordDelimiters\"=dword:00000000\r\n\"ColorTable00\"=dword:00000000\r\n\"ColorTable01\"=dword:00800000\r\n\"ColorTable02\"=dword:00008000\r\n\"ColorTable03\"=dword:00808000\r\n\"ColorTable04\"=dword:00000080\r\n\"ColorTable05\"=dword:00800080\r\n\"ColorTable06\"=dword:00008080\r\n\"ColorTable07\"=dword:00c0c0c0\r\n\"ColorTable08\"=dword:00808080\r\n\"ColorTable09\"=dword:00ff0000\r\n\"ColorTable10\"=dword:0000ff00\r\n\"ColorTable11\"=dword:00ffff00\r\n\"ColorTable12\"=dword:000000ff\r\n\"ColorTable13\"=dword:00ff00ff\r\n\"ColorTable14\"=dword:0000ffff\r\n\"ColorTable15\"=dword:00ffffff\r\n\"CurrentPage\"=-\r\n\"WindowPosition\"=-\r\n<\/pre>\n<p>To reset Command Prompt preferences to defaults:<\/p>\n<ul>\n<li>Please copy the above contents and paste it into Notepad.<\/li>\n<li>Save the file with <code>.reg<\/code> <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">extension<\/a> (e.g., <code>reset_cmd.reg<\/code>.)<\/li>\n<li>Double-click the .reg file to apply the settings.<\/li>\n<\/ul>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230; <a title=\"How to Set Command Prompt Default Window Size and Position\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/set-cmd-prompt-default-window-size-position\/\" aria-label=\"Read more about How to Set Command Prompt Default Window Size and Position\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[106,441],"class_list":["post-5778","post","type-post","status-publish","format-standard","hentry","category-windows","tag-command-prompt","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":53640,"url":"https:\/\/www.winhelponline.com\/blog\/set-default-terminal-windows-11\/","url_meta":{"origin":5778,"position":0},"title":"How to Set the Default Terminal Application in Windows 11","author":"Ramesh","date":"June 14, 2023","format":false,"excerpt":"The Windows Terminal becomes the default terminal. This means, all command line applications, such as Command Prompt and PowerShell, will open in Windows Terminal automatically. This article tells you how to change the default terminal to Windows Console Host or revert to Windows Terminal as the default host. Set the\u2026","rel":"","context":"In &quot;Windows 11&quot;","block_context":{"text":"Windows 11","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-11\/"},"img":{"alt_text":"command prompt legacy mode enable or disable","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/cmd-enable-disable-legacy-console.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":24381,"url":"https:\/\/www.winhelponline.com\/blog\/add-open-command-window-here-menu-windows-11\/","url_meta":{"origin":5778,"position":1},"title":"How to Add &#8220;Open command window here&#8221; in Windows 11","author":"Ramesh","date":"October 10, 2021","format":false,"excerpt":"In Windows 11, the context menu \"Open Command window here\" doesn't exist by default. Instead, you'll see the \"Open in Windows Terminal\" and \"Open PowerShell window here\" (when you press Shift + right-click) options in the folder context menu. This article tells you how to add \"Open Command window here\"\u2026","rel":"","context":"In &quot;Windows 11&quot;","block_context":{"text":"Windows 11","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-11\/"},"img":{"alt_text":"windows terminal option in win+x start context menu","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2021\/10\/win-x-terminal-powershell-comd.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4837,"url":"https:\/\/www.winhelponline.com\/blog\/remove-open-powershell-window-here-rightclick-windows-10\/","url_meta":{"origin":5778,"position":2},"title":"Remove Open PowerShell window here from Right-Click Menu in Windows 10","author":"Ramesh","date":"December 15, 2016","format":false,"excerpt":"With the Windows 10 Creators Update, the context menu option \"Open command window here\" is hidden by default, and is replaced by the \"Open PowerShell window here\" entry. Not just that. PowerShell replaces Command Prompt in the Win+X (Power User) menu as well. In an earlier post, we saw how\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"add cmd here to right-click menu","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/command-prompt-context-windows-10.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/command-prompt-context-windows-10.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/command-prompt-context-windows-10.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/command-prompt-context-windows-10.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5924,"url":"https:\/\/www.winhelponline.com\/blog\/black-screen-command-prompt-open-logon-no-explorer-shell\/","url_meta":{"origin":5778,"position":3},"title":"Black Screen and Command Prompt Open at Logon &#8211; No Explorer Shell","author":"Ramesh","date":"November 4, 2017","format":false,"excerpt":"Due to a crypto-malware infection in the computer, after logging in to your user account, a black screen appears with a Command Prompt window open. Your desktop, taskbar, and the wallpaper (explorer shell) don't get loaded unless you type explorer.exe in the Command Prompt window manually. This problem may continue\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"black screen startup command prompt opens","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/shell-comspec-malware.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/shell-comspec-malware.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/shell-comspec-malware.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/shell-comspec-malware.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":929,"url":"https:\/\/www.winhelponline.com\/blog\/enable-quick-edit-command-prompt-by-default\/","url_meta":{"origin":5778,"position":4},"title":"How to Enable Quick Edit Mode in the Command Prompt by Default","author":"Ramesh","date":"September 22, 2009","format":false,"excerpt":"You can use the mouse to copy Command Prompt text to the clipboard by enabling the Quick Edit option in Command Prompt shortcut properties. What if you don't use a desktop shortcut to open Command Prompt, and rather run cmd.exe directly? Here is a registry edit which enables Quick Edit\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6001,"url":"https:\/\/www.winhelponline.com\/blog\/windows-10-defaults-safe-mode-cant-boot-normal\/","url_meta":{"origin":5778,"position":5},"title":"Fix: Windows Defaults to Safe Mode, Can&#8217;t Boot into Normal Mode","author":"Ramesh","date":"December 7, 2017","format":false,"excerpt":"The Safe mode is used to troubleshoot problems on your PC. It is a mode wherein Windows starts in a basic state, using a limited set of drivers. For example, if the problem doesn't happen in safe mode, you'll know default settings and basic device drivers aren't causing the issue.\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"windows 10 defaults to safe mode","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/12\/safemode-stuck-windows-10-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/12\/safemode-stuck-windows-10-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/12\/safemode-stuck-windows-10-2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/5778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=5778"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/5778\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=5778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=5778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=5778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}