Search Tools Links Login

Launch Application From URL Like AIM


This tells how to launch a program from a web browser by typping in a url like AIM (e.g. myapp:// would launch c:program filesmyappmyapp.exe)

Original Author: whiteknight

Code

In the Regestry HKEY_CLASSES_ROOT Create a Key named what you want the 'protocol' to be (e.g. myapp).
The '(Default)' value for that key is a description of the protocol.
A Subvalue needs to be created named 'URLProtocol' the value of this is "".
Then create a New SubKey to the protocol Key name it 'shell', no values need to be set here.
Now create a SubKey to 'shell', name this 'open', no values to set. Next create asubkey to 'open', name this 'command'.
The '(Default)' value for this key is the path to the application(e.g. c:program filesmyappmyapp.exe %1).
The '%1 will return any command line params to your application, i.e. any thing after the 'myapp://' will be returned.


Thats it now you can open up your browser and type in the protocol (e.g. myapp://) and your application will launch.


I have tested that so It does work.

If you like this please post comments and vote.
if anyone knows how to see if commands are passed please either post how in the comments or email me @ witenite87@excite.com.



Download a working use of this in a Win32 Whois Client. It Looks like other windows utilities like ping, ipconfig ect. It does NOT use the winsock ocx it uses winsock API. Its FREE so Get it now. Download the WhoIs Client Here

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 78 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.