Personalization Add Windows Batch File (BAT) to New Context Menu in Windows 11


  • Staff
BAT_banner.png

This tutorial will show you how to add or remove Windows Batch File to the New context menu for all users in Windows 10 and Windows 11.

A .bat file is a batch file that consists of a series of commands to be executed by Command Prompt (cmd.exe), stored in a plain text file.

The New context menu allows users to quickly create a new item in the current location.

The default New context menu items include to create a new Folder, Shortcut, Bitmap image, Text Document, Compressed (zipped) Folder, and Library.

If you like, you can add Windows Batch File to the New context menu to make it easier for users to create a new BAT file on demand.


You must be signed in as an administrator to add or remove Windows Batch File on the New context menu.



EXAMPLE: Windows Batch File (BAT) added to New context menu

File_Explorer_New_menu.png
New_context_menu.png




Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add Windows Batch File (BAT) to New Context Menu

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Add_BAT_to_New_context_menu.reg


(Contents of .reg file)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.bat\ShellNew]
"NullFile"=""

3 Remove Windows Batch File (BAT) from New Context Menu

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Remove_BAT_from_New_context_menu.reg


(Contents of .reg file)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\.bat\ShellNew]

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Sometimes you may need to either restart explorer process, sign out and sign in, or restart the computer to apply.

8 You can now delete the downloaded .reg file if you like.


That's it,
Shawn Brink


 

Attachments

  • BAT.png
    BAT.png
    2.3 KB · Views: 53
  • Add_BAT_to_New_context_menu.reg
    520 bytes · Views: 170
  • Remove_BAT_from_New_context_menu.reg
    496 bytes · Views: 135
Last edited:
Back
Top Bottom