Many users know that in Windows 10, the latest operating system from Microsoft, the command prompt got updated. The command prompt window in Windows 10 supports free resizing and copy-paste using familiar hotkeys like Ctrl + C/V. But do you know that you can finally close the command prompt window using Alt + F4, like any other regular window? In this article, we will review this behavior and see a way to disable it.
Advertisеment
Windows 10 is the first operating system where Microsoft has made it possible to close the command prompt window using the common shortcut Alt + F4. In all previous Windows versions like Windows XP, Windows Vista, Windows 7 or Windows 8, you had to type "exit" to close the command prompt or or click the "X" button using the mouse or touch.
This improvement is really nice. There is no reason actually for anyone to disable this feature. However, if you really need to disable this ability of the command prompt to be closed with Alt + F4, Microsoft allows a Registry tweak.
Here is how it can be done.
- Close all opened command prompt instances.
- Open Registry Editor.
- Go to the following path:
HKEY_CURRENT_USER\Console
Tip: See how to jump to the desired Registry key with one click.
- Create a new 32-bit DWORD value named AllowAltF4Close. Note: If you are running 64-bit Windows 10, you still need to create a 32-bit DWORD value. Set its value data to 0.
Now, if you open the command prompt, it will not be possible to close it using the Alt + F4 hotkey.
Note: In command prompt's options, it is possible to enable the "legacy" mode of the console:
When enabled, it disables the free resize feature and Ctrl + C, V, Alt + F4 keyboard shortcuts all at once. Using the described tweak, you will be able to disable Alt + F4 separately but keep all other functions working.
Like I said earlier, there is no reason really to disable this extra feature. It is incredibly useful. The purpose of this article was to make you aware that you can finally close the Command Prompt using Alt+F4 and show you a way to control this behavior.
That's it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
Advertisеment
alt-space-c