Add File Templates to the Desktop > New Right Click Menu

Neemobeer

Windows Forum Team
Staff member
#1
This tutorial will allow you to add template files of any type to the New menu when you right click on the desktop. Anything in the existing template file will automatically be in the newly created file.

I'm going to add a template batch file that simply contains the batch command @echo OFF to turn off echoing command execution.

Here is the template batch file
b2.PNG

and the content
b1.PNG


Now copy the "Batch File.bat" file to "C:\Windows\ShellNew" (Requires administrator access)
Next we need to edit the registry to load this in the New menu
Open regedit.exe
You can edit one of the following

(Edit this if you want the change available to all users)
HKEY_CLASSES_ROOT\.bat

(Edit this if you want the change only available to the current user)
HKEY_CURRENT_USER\Software\Classes\.bat

Right click on .bat and select New Key
Name it ShellNew
Right click on ShellNew and select New > REG_SZ and name it FileName
Double click on FileName and enter the name of your template file in this case Batch File.bat

[Optional]
I also created a REG_SZ value called IconPath which lets you set the menu item icon I set it to cmd.exe
b3.PNG


Now open a regular command prompt and type these two commands
taskkill /f /im explorer.exe
start explorer.exe

That's it! now right click on the desktop and select New and you should see your new file template
b4.PNG
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top