Advertisement

Command prompt in Windows 10 can be closed by Alt+F4

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.

Advertisement


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.

  1. Close all opened command prompt instances.
  2. Open Registry Editor.
  3. Go to the following path:
    HKEY_CURRENT_USER\Console

    Tip: See how to jump to the desired Registry key with one click.

  4. 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.Windows 10 disable Alt F4 command prompt

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:Windows 10 legacy 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!

Advertisment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

One thought on “Command prompt in Windows 10 can be closed by Alt+F4”

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.