Windows allows for application protocols in which, through the registry, you specify a URL scheme and a command line to have that URL passed to your application. Its an easy way to hook a webbrowser up to your application. Anyone can read the doc above and then walk through the registry and pick out the application protocols but just from that info you can't tell what the application expects these URLs to look like. I did a bit of research on some of the application protocols I've seen which is listed below. Good places to look for information on URI schemes: Wikipedia URI scheme, and ESW Wiki UriSchemes.
|search-ms||Windows Search Protocol||
The search-ms application protocol is a convention for querying the Windows Search index. The protocol enables applications, like Microsoft Windows Explorer, to query the index with
parameter-value arguments, including property arguments, previously saved searches, Advanced Query Syntax, Natural Query Syntax, and language code identifiers (LCIDs) for both the Indexer and
the query itself. See the MSDN docs for search-ms for more info.
From the OneNote help:
ESW Wiki Info on callto
Skype callto info
NetMeeting callto info
Tells iTunes to subscribe to an indicated podcast. iTunes documentation.
C:\Program Files\iTunes\iTunes.exe /url "%1"
|Magnet||Magnet URI||Magnet URL scheme described by Wikipedia. Magnet URLs identify a resource by a hash of that resource so that when used in P2P scenarios no central authority is necessary to create URIs for a resource.|
RFC 2368 - Mailto URL Scheme.
Opens mail programs with new message with some parameters filled in, such as the to, from, subject, and body.
Example: mailto:?email@example.com&subject=test&body=Test of mailto syntax
MSDN describes associated protocols.
Wikipedia describes MMS.
"C:\Program Files\Windows Media Player\wmplayer.exe" "%L"
Also appears to be related to MMS cellphone messages: MMS IETF Draft.
Opens SecondLife to the specified location, user, etc.
SecondLife Wiki description of the URL scheme.
"C:\Program Files\SecondLife\SecondLife.exe" -set SystemLanguage en-us -url "%1"
Open Skype to call a user or phone number.
Wikipedia summary of skype URL scheme
"C:\Program Files\Skype\Phone\Skype.exe" "/uri:%l"
|skype-plugin||Skype Plugin Protocol Handler||
Something to do with adding plugins to skype? Maybe.
"C:\Program Files\Skype\Plugin Manager\skypePM.exe" "/uri:%1"
Opens TortoiseSVN to browse the repository URL specified in the URL.
C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe /command:repobrowser /path:"%1"
Wikipedia describes webcal URL scheme.
Webcal URL scheme description.
A URL that starts with webcal:// points to an Internet location that contains a calendar in iCalendar format.
"C:\Program Files\Windows Calendar\wincal.exe" /webcal "%1"
Provides access to some Zune operations such as podcast subscription (via Zune Insider).
"c:\Program Files\Zune\Zune.exe" -link:"%1"
|feed||Outlook Add RSS Feed||
Identify a resource that is a feed such as Atom or RSS. Implemented by Outlook to add the indicated feed to Outlook.
Feed URI scheme pre-draft document
"C:\PROGRA~2\MICROS~1\Office12\OUTLOOK.EXE" /share "%1"
RFC 3860 IM URI scheme description
Like mailto but for instant messaging clients.
Registered by Office Communicator but I was unable to get it to work as described in RFC 3860.
"C:\Program Files (x86)\Microsoft Office Communicator\Communicator.exe" "%1"
RFC 5341 - tel URI scheme IANA assignment
RFC 3966 - tel URI scheme description
Call phone numbers via the tel URI scheme. Implemented by Office Communicator.
"C:\Program Files (x86)\Microsoft Office Communicator\Communicator.exe" "%1"
More ideas stolen from me in the same vein as my stolen OpenID thoughts.
Fast Pedestrian Crossing on Four Way Stops. In college I didn't have a car and every weekend I had weekly poker with friends who lived nearby so I would end up waiting to cross from one corner of a traffic lit four way stop to the opposite corner. Waiting there in the cold gave me plenty of time to consider the fastest method of getting to the opposite corner of a four-way stop. My plan was to hit the pedestrian crossing button for both directions and travel on the first one available. This only seems like a bad choice if the pedestrian crossing signal travels clockwise or counter clockwise around the four way stop. In those two cases its better to take the later of the two pedestrian signal crossings, but I have yet to see those two patterns on a real life traffic stop. I decided recently to see if my plan was actually sound and looked up info on traffic signals. But the info didn't say much other than "its complicated" and "it depends" (I'm paraphrasing). Then I found some guy's analysis of this problem. So I'm done with this and I'll continue pressing both buttons and crossing on the first pedestrian signal. Incidentally on one such night when I was waiting to cross this intersection I heard a loud multi-click sound and realized that the woman in the SUV waiting to cross the intersection next to me had just locked her doors. I guess my thinking-about-crossing-the-street face is intimidating.
Windows Searching Windows Media Center Recorded TV's Closed Captions. An Ars-Technica article on a fancy DVR described one of the DVRs features: full text search over the subtitles of the recorded TV shows. I thought implementing this for Windows Media Center recorded TV shows and Windows Search would be an interesting project to learn about video files, and extending Windows Search. As it turns out though some guy, Stephen Toub implemented Windows Search over MCE closed captions already. Stephen Toub's article is very long and describes some other very interesting related projects including 'summarizing video files' which you may want to read.
whichcommand is a rather literal port and requires you to enter the entire name of the command for which you're looking. That is '
which which' won't find itself but '
which which.exe' will. This makes this almost useless for me so I thought to write my own as a batch file. I had learned about a few goodies available in cmd.exe that I thought would make this an easy task. It turned out to be more difficult than I thought.
The environment variables
for /F "usebackq tokens=*" %%a in ( `"echo %PATH:;=& echo %"` ) do ( for /F "usebackq tokens=*" %%b in ( `"echo %PATHEXT:;=& echo %"` ) do ( if exist "%%a"\%1%%b ( for %%c in ( "%%a"\%1%%b ) do ( echo %%~fc ) ) ) )
PATHEXThold the list of paths to search through to find commands, and the extensions of files that should be run as commands respectively. The '
for /F "usebackq tokens=*" %%a in (...) do (...)' runs the '
do' portion with
%%asequentially taking on the value of every line in the '
in' portion. That's nice, but
PATHEXTdon't have their elements on different lines and I don't know of a way to escape a newline character to appear in a batch file. In order to get the
PATHEXT's elements onto different lines I used the
%ENV:a=b%syntax which replaces occurrences of a with b in the value of ENV. I replaced the '
;' delimiter with the text '
& echo' which means
%PATHEXT:;=& echo%evaluates to something like "
echo .COM& echo .EXE& echo .BAT& ...". I have to put the whole expression in double quotes in order to escape the '&' for appearing in the batch file. The
usebackqand the backwards quotes means that the backquoted string should be replaced with the output of the execution of its content. So in that fashion I'm able to get each element of the env. variable onto new lines. The rest is pretty straight forward.
C:\Users\davris>which.cmd *hi* C:\Windows\System32\GRAPHICS.COM C:\Windows\System32\SearchIndexer.exe D:\bin\which.exe D:\bin\which.cmd
Running this on a command prompt gives the following:
However, after a little more experimentation I found this was slightly overkill for my purposes since if I rename the file to helloworld.js and just type its name like a command it is run by cscript:
C:\Users\davris>helloworld C:\Users\davris>/* 2>NUL Hello world.
So this time I didn't need all that but if ever in the future I need to run a batch file then a JS file I can do it with one file...
C:\Users\davris>helloworld Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved. Hello world.