Reputation: 1049
I've already known how to add specific extension to the New Menu in Windows 7 with regedit, but now I want to add the type FILE (i.e. pure file without an extension), how can I do it?
Upvotes: 3
Views: 1618
Reputation: 333
Here is a registry script based on lichenbo's answer.
It uses .emptyfile
to avoid conflicts. Using .
registry key could cause strange issues. The file will still be created with no extension due to the NoExtension
value.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\emptyfile]
@="Empty File"
[HKEY_CLASSES_ROOT\.emptyfile]
@="emptyfile"
[HKEY_CLASSES_ROOT\.emptyfile\ShellNew]
"NullFile"=""
[HKEY_CLASSES_ROOT\.emptyfile\ShellNew\config]
"NoExtension"=""
Upvotes: 0
Reputation: 1049
Ah, I got it right with google. Here is the solution:
1. Create a key of any extension or just a '.' in the HKEY_CLASSES_ROOT, and make the default value 'genericfile'
2. Create the ShellNew in the extension you just created
3.Create a string in the ShellNew with the name 'NullFile' and the value empty
4.Create the key 'Config' in the 'ShellNew' and a string in the config with the name 'NoExtension' and value empty
5.Create the key 'genericfile' in the HKEY_CLASSES_ROOT, and make the default value the text you want to display in your new context value (Such as "New Empty File")
Wish helps you a lot :-)
Upvotes: 5