Windows 10 Command Prompt Can Be Closed using ALT+F4 Hotkey

The much useful ALT+F4 key sequence closes any application, but not the Command Prompt window. Users had to type exit or click the Close button to close the window. This is the case in earlier versions of Windows (up to Windows 8.1), but have you noticed that the Windows 10 Command Prompt duly responds to ALT+F4 hotkey?

Not only that! You can even change the Windows 10 Command Prompt behavior as in earlier Windows versions. Probably the developers at Microsoft had legacy applications in mind. By the way, to make Command Prompt not respond to ALT+F4 key sequence, all you need to do is to edit a registry value.

Changing the Command Prompt ALT+F4 Behavior

Click Start, type Regedit.exe and press {ENTER}. Navigate to the following registry key:

HKEY_CURRENT_USER\Console

Create a DWORD (32-bit) value named "AllowAltF4Close", and set its value data to 0



Exit the Registry Editor.

Now, open a Command Prompt window and try ALT+F4 to close it. I bet you can’t!


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment