Search code examples
registrywindows-explorer

How to create a context menu items that creates a file


Currently, I have a context menu item to create a PHP file. That is an easy way to prevent me from making them every time again.

It is already listed in the context menu
PHP in menu

But, unfortunately it does not create a PHP file, it opens command prompt without a command.

This is the command that it needs to executeRegister

Final question: How can I add one .php file when I click on "PHP"


Solution

  • Alternative way with New submenu:

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.php]
    @="phpfile"
    
    [HKEY_CLASSES_ROOT\.php\ShellNew]
    "NullFile"=""
    
    [HKEY_CLASSES_ROOT\phpfile]
    @="PHP file"
    

    enter image description here