Windows – Add other file types in the “New” context menu

windowswindows 7

I'm trying to add PHP and HTML files' entries to the right-click on Desktop -> New menu. It says the values were successfully added to registry but still they don't show up in the menu.

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


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

This is the guide I've tried: http://www.sevenforums.com/tutorials/22001-new-context-menu-edit-desktop.html

I have UAC disabled if that makes any difference.

Best Answer

Here is the reg file for adding shell new entry for .php & .html

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.php]
@="phpfile"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\.php\ShellNew]
"Data"=hex:3c,3f,70,68,70,0d,0a,0d,0a,3f,3e

[HKEY_CLASSES_ROOT\phpfile]
@="PHP Script File"

[HKEY_CLASSES_ROOT\phpfile\DefaultIcon]
@="%SystemRoot%\\System32\\WScript.exe,3"

[HKEY_CLASSES_ROOT\phpfile\shell]

[HKEY_CLASSES_ROOT\phpfile\shell\open]

[HKEY_CLASSES_ROOT\phpfile\shell\open\command]
@="notepad %1"

[HKEY_CLASSES_ROOT\.html\ShellNew]
"FileName"="htmlfile.html"

Now create a htmlfile.html file in your Windows\ShellNew folder and enter default html :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Title Goes Here</title>
</head>
<body>

</body>
</html>
Related Question