ShellNew Icon for "." File Type
I have successfully created a ShellNew
command so that I can create a new blank file with no file extension, with the reg file being:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.]
[HKEY_CLASSES_ROOT\.]
@="emptyFile"
[HKEY_CLASSES_ROOT\.\ShellNew]
"NullFile"=""
@="Empty File"
"ItemName"=""
[HKEY_CLASSES_ROOT\.\ShellNew\Config]
"NoExtension"=""
[-HKEY_CLASSES_ROOT\emptyFile]
[HKEY_CLASSES_ROOT\emptyFile]
@="Empty File"
[HKEY_CLASSES_ROOT\emptyFile\DefaultIcon]
@="%SystemRoot%\\system32\\imageres.dll,2"
This works fantastic, creating the file just how I want it to, but the icon displayed in the ShellNew
window is the icon for the System Partition [below]; how can I change this icon to match the DefaultIcon I am providing for the file type itself?
1
- I have tried making an "Icon" String Value like what I had to do for the Unity and Sublime Text menu items, but that did not work no matter where I put it
Solution 1:
Try this, which works like magic, with the only change being I added an IconPath at the .ext
level (file type associations are amazing stuff!):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.]
@="emptyFile"
[HKEY_CLASSES_ROOT\.\ShellNew]
"NullFile"=""
@="Empty File"
"ItemName"=""
"IconPath"="C:\\windows\\system32\\imageres.dll,2"
[HKEY_CLASSES_ROOT\.\ShellNew\Config]
"NoExtension"=""
[-HKEY_CLASSES_ROOT\emptyFile]
[HKEY_CLASSES_ROOT\emptyFile]
@="Empty File"
[HKEY_CLASSES_ROOT\emptyFile\DefaultIcon]
@="%SystemRoot%\\system32\\imageres.dll,2"