Add .PHP File Type to the New Menu in Windows 2000/XP/Vista

One of our readers asked how to add .PHP file type to the New menu in Windows. I’ve created a REG file that adds a PHP File entry to the New menu in Windows (2000/XP/Vista).

Add PHP file type to the New menu

Copy the following code to Notepad, and save the file as phpnew.reg. Double-click the file to run it.

REGEDIT4

[HKEY_CLASSES_ROOT\.php]
@="phpfile"

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

[HKEY_CLASSES_ROOT\phpfile]
@="PHP File"

[HKEY_CLASSES_ROOT\phpfile\shell\open]

[HKEY_CLASSES_ROOT\phpfile\shell\open\command]
@="\"C:\\windows\\NOTEPAD.EXE\" \"%1\""

Now right-click on an empty area on the Desktop, and click New. PHP File should be listed in the New menu.

Note: The above REG associates .PHP files with Notepad. If you need to use a different editor for PHP files, alter the path accordingly in the REG file, or directly edit the following registry key:

HKEY_CLASSES_ROOT \ phpfile \ shell \ open \ command

More Information

We have covered this earlier in the following articles:

Add items to the New menu manually

Adding and removing ShellNew entries in Vista

Add or remove entries in the New objects list using TweakUI


Copyright © 2008 Ramesh Srinivasan. All rights reserved.

RELATED POSTS


Add to Google

2 Responses to “Add .PHP File Type to the New Menu in Windows 2000/XP/Vista”

  1. 2
    Ramesh Srinivasan Says:

    @whlooi: Yes. It can be used for any file type after altering the extension, Prog ID and the executable name.

  2. 1
    whlooi Says:

    Basically I can use this script for any file type? Rite?

Leave a Reply