Adding A Context Menu Item For Phing On Windows

21st March 2012

To make things a bit quicker when using Phing on Windows use the following registry entry to create a right click option that integrates with Phing.

  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_CLASSES_ROOT\*\shell]
  4.  
  5. [HKEY_CLASSES_ROOT\*\shell\Phing]
  6. @="Phing It!"
  7.  
  8. [HKEY_CLASSES_ROOT\*\shell\Phing\command]
  9. @="cmd.exe /K phing -f \"%1\""

Save the above text into a file with a .reg file extension and run it by double clicking on it (you can also right click and select Merge). You will get a message asking if you want to add information to the registry, click "Yes" to allow the entry.

With this in place will see a menu item called "Phing it!" when you right click on a file. If you run this on a Phing build.xml file you will open a command window and run the command phing -f, passing in the filename you clicked on as the argument. This runs the build file and is a quick and easy way to run Phing tasks on your Windows environments.

This has been tested fully on Windows XP, but if you have any problems please let me know.

Add new comment

The content of this field is kept private and will not be shown publicly.