I'm trying to add CSS, PHP, JS and HTML file types to the "New" right click menu in Windows 7. I know how to add the file types to the menu with ShellNew entries in the registry. But Windows doesn't give you any control ove开发者_JS百科r the display names of the new items - according to this the name's always taken from whatever application you've assigned to open the doc. I've set Notepad++ to open all of these file types, so I'm going to end up with several identical "Notepad++ document" entries in the menu, like this:
Does anybody know if there's a way out of this stupid situation without installing any tweak utilities?
Thanks all! Fred
To rename a context menu > new's item (in Windows 7, at least):
- Open regedit.
- Go to
HKEY_CLASSES_ROOT\.%ext%
and note the(Default)
value. This is the file extension's ProdID. - Go to
HKEY_CLASSES_ROOT\%ProdID%
(usually%ext%file
) using the value obtained from step two. Set the(Default)
value to whatever you would like the context menu new item to display as. - Under
HKEY_CLASSES_ROOT\%ProdID%
, if there is aFriendlyTypeName
value, rename it toFriendlyTypeName.old
, as the(Default)
value "is deprecated by the FriendlyTypeName entry"
I don't believe there is even a need to log out / restart, but if the changes don't take effect, log out and/or restart.
You could change the file type description for each file class manually.
- Look up the prog id under
HKEY_CLASSES_ROOT\.%ext%
(The default value) - Under
HKEY_CLASSES_ROOT\%progid%
, set the default value and/or the "FriendlyTypeName" string to the string you want.
You might have to log off for it to take effect. You should probably stay away from the Chrome and Notepad++ file type/association dialogs so they don't overwrite your strings.
Both Chrome and Notepad++ are open source, you can create a patch for them that use better names for the file types. (What is a "Chrome HTML Document" anyway, HTML5 + extra chrome juice? =) )
I was able to derive a solution from the answers above.
I replicated the particular application (JetBrains PHPStorm in my case) registry entry.
PHPStorm2019.1 -> PHPStorm2019.1.scss, PHPStorm2019.1.js.
Now I changed the Default REG_SZ of
PHPStorm2019.1.scss
to SCSS File andPHPStorm2019.1.js
to JavaScript file.Mapped
.scss
and.js
toPHPStorm2019.1.scss
andPHPStorm2019.1.js
respectively.
精彩评论