Create templates for the menu to create a document. Edit the menu for creating files "Explorer" Windows

After installation latest version Microsoft Office  2014 there was a problem: in any folder when you click on the right mouse button in the paragraph   "Create" there was no option to create a new Microsoft Excel worksheet.

The Internet is full of solutions, how to add your file type to this section, but all solutions are incomplete. My instructions are suitable for 2014 offices, but with a few obvious adjustments, you can use this solution for previous versions.

  1. So, open the Start - Run - regedit - OK.
  2. Open HKEY_CLASSES_ROOT \\. Xlsx: in this branch there should be a default value of "Excel.Sheet.12", and the Content Type must be "application / vnd.openxmlformats-officedocument.spreadsheetml.sheet".
  3. Inside the .xlsx branch, you must create a partition named "Excel.Sheet.12".
  4. In this section, we create another section "ShellNew", and in it we add a string parameter FileName with the value "C: \\ Program Files \\ Microsoft Office 15 \\ root \\ vfs \\ Windows \\ SHELLNEW \\ EXCEL12.XLSX". This is necessary so that not an empty file is created, but a file by template. This template is in the folder with the office, the path to this file may be different, check it yourself. By default, it is located at the address specified above.
  5. Done! You can terminate the explorer.exe process and restart it, or just restart the computer.

Bonus!  For those who are too lazy to pick the registry yourself, I offer a ready-made file that is enough to import into the registry (double click on it). If you have installed Microsoft Office 2014 in a standard folder, then this file will work without problems.

The result should be as follows:



We examined the subsection of the file identifier and its parameters, which affect the display of the file in the Explorer. Today, we'll look at the ShellNew subkey from the file extension branch ( HKEY_CLASSES_ROOT \\ .extension \\ ShellNew), the presence of which indicates the presence of a file type in the "Create" menu.

Subsection ShellNew  is present in some files right after the installation of the system. A typical example is a shortcut file (* .lnk), you can create a shortcut in almost any area of ​​the file system.

The very fact of subsection ShellNew - a condition necessary, but insufficient for the correct functioning of the menu item "Create". For this item to work in the subsection, one of these string type parameters must be present:

In addition, in ShellNew  the following parameters can also be found, also of a string type:

  • IconPath  - Specifies the path to the icon displayed for the "Create" menu item.
  • MenuText  - specifies the text name of the menu item "Create". It can be directly text or a link to a string resource of a DLL file.

There are a number of additional options for configuring the mechanism for creating a new file through the "Create" menu. These possibilities are regulated by parameters of a string type with an empty value, located in subsection HKEY_CLASSES_ROOT \\ .extension \\ ShellNew \\ Config:

  • NoExtension - delete the extension of the created file being created. Each time you create a new Explorer folder, you see this option in action.
  • DontRename - do not select the name of the newly created file for renaming.
  • IsFolder is a sign that the file being created is a means of organizing links to files. A regular folder is a vivid example.
  • NoEmptyFile - creating an empty file is not allowed (hmm, antipode ShellNew \\ NullFile?)

Let's use this information in practice.

Example №1. Creating the item "New archive 7z"

Create for the 7-zip archiver the menu item "Create" (here I assume that it is already installed on the destination computer), which we will use to create a new archive 7z.

Example number 2. Create libraries anywhere in the file system

In the early assemblies Windows 7  there was an opportunity to create libraries where your heart desires. Closer to the final extension subsection HKEY_CLASSES_ROOT \\ .library-ms \\ ShellNew  modified so that libraries can now be created only in the corresponding folder. As a demo in this article, we'll turn this feature back on.

Customize and adjust to your needs the context menu of "Explorer", in particular, the submenu creating new files and folders.

In the "Explorer" context menu of Windows there is a submenu for creating new files and folders. However, there is not much use for it, since the necessary programs usually do not write their templates there, and unnecessary ones, on the contrary, just take the lines in vain. In this article we will describe how this menu can be adjusted to suit your needs.

First, let's look at how to clear it of unnecessary lines.

There are two options. The first option is to use the Microsoft PowerToys Tweak UI tool.

After installing and downloading this application, follow the section Templates. It's all simple. Pressing the Delete button deletes the selected line, and by removing the checkmark next to one or another line, we temporarily deactivate the menu item for which it answers.

If someone does not like this simple solution (or operating system  Windows of the old version, with which PowerToys does not work), then there is a second option. Its essence is as follows. Experimentally, we find out what extension the created file has, from the possibility of creating which we want to get rid of. Let's say this.doc. We go to the registry, find the HKEY_CLASSES_ROOT branch and open the file.doc extension.

Remove all subdirectories named ShellNew from the branch. Note that they can be either directly in the extension folder or in its deeper subdirectories. It is recommended to save a copy of this registry branch.

Well, with the removal understood. All changes take effect immediately (more precisely, after a few seconds), a reboot is not required.

Now let's see how you can create your own line in this menu.

Let's start solving the problem again with the help of Microsoft PowerToys Tweak UI mentioned above. First in the program  create a file and save it (it will be the initial template). Then open the Tweak UI and click the Create button in the Templates section. The utility will ask you to specify a template file, specify only the created file. Done. Now, if you select the line of our new file in the context menu, the template file will be copied to this place.

Meanwhile, the possibilities of this mechanism are much wider than what the Tweak UI offers. For example, you can automatically run a program at once, or create a template file of zero size.

So, if simple creation  file is small, we go to the registry in the HKEY_CLASSES_ROOT section, we find there an extension of the desired file type. There we grope or create a subfolder named ShellNew (in order to create a new line in the context menu of the explorer about creating the file, just create a subfolder with the name ShellNew in the registry for the extension of the desired file type).

The next option is to give the option to create a file to the program. Specify a string parameter Command. As it is easy to guess from the title, this command line, which will be launched. In Command we simply write in quotation marks the full path to the program file, a space and (also in quotation marks) the macro% 1 (it will be replaced with the name of the file just created), for example, "c: \\ windows \\ notepad.exe" "% 1" .

Now the created file will open immediately in the specified program.

Parameters FileName, Data, NullFile, Command all together can not be used, you can apply only one of them.

1. Described in the Knowledge Base

Adding a new item to the "Create" menu
  Chebotarev Igor

I was sitting here recently, sculpted several pages for the site. It was necessary to create all the files "from scratch", so that the method of simple copying and editing did not pass. I usually work in FARe, but this time I had to use a computer where it was not, and create all the files in the notebook. It is painfully uncomfortable to do this - to create a bunch of original files of the same type all the time, and I remembered the possibility of creating files windows tools. Did you pay attention to paragraph context menu  "Create", which appears if you click on the Desktop or free space  open folder? Well, of course, they did, because that's how you create new directories and shortcuts to programs. But you created something else (because there is a very impressive list)? I doubt it. And if they created it, it is very rare. And, nevertheless, it is very convenient function. It's a pity that there are not those files that we can use. So what's the problem? Add the menu items for the files we need.
  So, it all started with html-files, and a large part of the audience of this site are people who are somehow connected with web design, so I will show you how to create a new menu item.
  But we will not start from the registry (although it can not do without it), but from the Windows directory (well, or where it is installed there) ... We need to find the ShellNew directory there. Please note that it is hidden. It stores the workpieces for files that are created using the context menu. If you have Microsoft Office installed, you will see files for Word and Excel, and some other files in this directory. But now they do not interest us. Create a file in it, for example index.html. Use for these purposes is best FARom (I really love this file manager, so I'm trying to promote it in the masses). Inside it write the preparation of your page. Personally, I wrote the following:









although, you can add something else to your taste (for example, meta tags, some kind of design in the body).
  Save the file. Now it's the turn of the registry (as without it :)). If you remember, in the article Registering file extensions with the Windows Registry the method of this very registration was described. The material presented there will be useful for understanding the essence of the manipulations, although you can do without it. So, look for the HKEY_CLASSES_ROOT \\ .htm and HKEY_CLASSES_ROOT \\ .html section and create ShellNew sections in them. In the ShellNew section, create the string parameter FileName as the value of which we need to specify the name of the template we created. That's all. It remains only to restart the computer and admire the new menu item.
  By the way, the file will be created initially with the name that is specified in the "Default" parameter of the HKEY_CLASSES_ROOT \\ htmlfile section (which section is for other extensions can be seen in the "Default" parameter of the HKEY_CLASSES_ROOT \\ .XXX section, where XXX is the file extension) .
  Actually, I said "all" early. After all, you do not need to create a file template. It can be empty, but then instead of the FileName parameter, you need to create an empty string parameter NullFile.
  And what if the partition with the extension you need is not in HKEY_CLASSES_ROOT? Here, then you will need a reference to the article above. First, you register this extension in Windows, and then you do all the simple manipulations described in this article.
  Well, how to remove the menu item from the "Create", I think, should not be explained. Everything is quite simple and it will not be difficult to understand.
  Now everything is for sure. Finally, I will say that by spending fifteen minutes, you can save much more time in the future, because you can create not only html-files, but also any others. Who prevents to create several templates of frequently used documents of your organization, and then only to choose the necessary ones from the menu. So it all depends on your imagination, and I'm sure that you have it rich :).

Do you like the article? Share with friends: