add a blank file to the windows 'new' context menu

13

7

Whilst i have found posts that tell me how to add a new context item for a specific file type, i seem to be unable to see a way of adding one for a blank file (a la ubuntu). Is there a way of adding just a blank file (with no extension), which i can then rename myself with the appropriate extension?

richzilla

Posted 2010-12-13T23:50:39.967

Reputation: 2 003

I came across this question, just wondering if you found a solution? – TechnicalTophat – 2016-06-06T10:45:35.493

Answers

14

Create a genericFile.reg with the following content and add it to the registry. This will add a new context menu entry called "Generic file". A reboot may be required in order to let the entry appear. Or simply use Shell New Handler and tick/untick the entry for the .dummy once.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.generic]
@="genericfile"

[HKEY_CLASSES_ROOT\.generic\ShellNew]
"NullFile"=""
"IconPath"="%SystemRoot%\\System32\\imageres.dll,2"

[HKEY_CLASSES_ROOT\.generic\ShellNew\Config]
"NoExtension"=""

[HKEY_CLASSES_ROOT\genericfile]
@="Generic file"

orschiro

Posted 2010-12-13T23:50:39.967

Reputation: 2 335

1The icon doesn't match the empty file icon, for me anyway. This takes care of that: "IconPath"="%SystemRoot%\\System32\\imageres.dll,2". It should be a child of ShellNew. – bryc – 2015-02-27T06:08:26.817

Tested and still works on Windows 10 1803 – Alexandre Cox – 2019-08-31T16:58:46.840

0

The NullFile types create empty/0-byte "blank" files. You can rename them to whatever you like, with whatever extension you like, and go from there.

Details about resolving the "new text document" being missing here.

Mike Simpson

Posted 2010-12-13T23:50:39.967

Reputation: 424

0

You can create a template for .dummy (or whatever unused extension you like) files, then add a flag to indicate they should be created with no extension.

Here are the steps I followed:

  1. Create a file called 'asdf.dummy'
  2. Double-click on it, tell windows to always open it with notepad
  3. In regedit, go to "HKEY_CLASSES_ROOT\.dummy"
  4. Create the "ShellNew" key
  5. Under "ShellNew", create an empty string value named "NullFile"
  6. Under "ShellNew", create a key named "Config"
  7. Under "Config", create an empty string value named "NoExtension"

Here's what I ended up with:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.dummy]
@="dummy_auto_file"

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

[HKEY_CLASSES_ROOT\.dummy\ShellNew\Config]
"NoExtension"=""

Blorgbeard is out

Posted 2010-12-13T23:50:39.967

Reputation: 2 565