Adding A Context Menu Item For Phing On Windows

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.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell]

[HKEY_CLASSES_ROOT\*\shell\Phing]
@="Phing It!"

[HKEY_CLASSES_ROOT\*\shell\Phing\command]
@="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.
CAPTCHA
1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.