Custom protocols are where it’s at

I’m so over batch files.

After installing Microsoft’s Windows Script Host & Runtime (included, I believe, in winXP), you can easily create a JScript file that can register itself as a custom protocol handler in the registry. Anthony Morphett offered me one such script to create a “google” protocol and I edited it to create a new protocol “phpdocument”.

Now when I call “phpdocument://c:/path/to/a/file.php”, the default PHP file handler (Dreamweaver on my system) is called to open the file. The protocol is extra nice because browsers can be configured to open the links without bothering with any dialog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.