How can I create a link on a web page to activate a windows application?

pisceswzh

Well-known member
Joined
Mar 19, 2007
Messages
96
Programming Experience
1-3
I'm working on a project based on windows form application. Now, my boss want a feature that enable my own windows application to be activated and do a special subroutine when the user click a special link on a web page or email.

I saw some application have this feature, like Skype. (You click on the Skype Me button on a web page and you Skpye will be activated)

Please help! Any realated resources are appreciated. Thanks.
 
ActiveX Controls?

Hi,
I think Skype is using ActiveX Controls for this purpose. Skype Api is also available for windows developers.
 
That might be, otherwise it looks the key is "WScript.Shell" and its Run method, see for example this: http://www.eggheadcafe.com/articles/20010329.asp the key is the client script that creates the WScript.Shell instance and make the Run. You could be running into security permission issues, I haven't test run this myself in ASP.Net user context.
 
actually what i want is not to download and execute some file without notifying the user.

what i want is to click an HTML hyperlink and activate an application that has already been installed on the computer and trigger a certain event within that application (this event should be depend on the content of the hyperlink).

i once saw an hyperlink on a web page and doing exactly what i want. and the hyperlink looks like "MyApplication://WhatTheApplicationShouldDo"
 
just find an example!!

when u view my profile in the forum with user id: pisceswzh, u can see an Skype icon in the Instant Message section. after u click it, u can have several option to contact me thru skype. when u click on, say Send Me A File, ur skype on ur pc will be activated and ready to send me a file.

this is just what i want!! i can see the content of the link is "skype:pisceswzh?sendfile" when the mouse is hovering the link.

anyone have any idea on this??
 
wscript.shell/run doesn't download file, it just runs the command client-side.

What you ask is described in Registering an Application to a URL Protocol
In client app you read parameters with Environment.GetCommandLineArgs method. For example the protocol prefix mentioned that is included in arguments you can remove directly in client application, using the article script for that is not necessary.
 
wscript.shell/run doesn't download file, it just runs the command client-side.

What you ask is described in Registering an Application to a URL Protocol
In client app you read parameters with Environment.GetCommandLineArgs method. For example the protocol prefix mentioned that is included in arguments you can remove directly in client application, using the article script for that is not necessary.

The article you provided is very helpful. Thank you.
 
Another problem on this topic: Is it possible to make MyApplication:WhatToDo automatically a html link in say, Email message or IM applications just like when I type in http://xxx or mailto:xxx? I am not sure whether it is possbile to do so? Thanks!
 
It's up to each application to interpret some text as "special" and make it a "link" if needed. I tested with Outlook/Word and Messenger and they will do this for http: file: ftp: and some protocols but not res: about: and other standard protocols. You might try to write your protocol link with the common notation "MyApplication://WhatToDo" and some applications will perhaps recognize the pattern and make it an active link. Else you have to rely on html anchors and "insert link" features, for example while my Outlook html email will not auto-link "MyApplication:WhatToDo" or "MyApplication://WhatToDo" I can actively insert a link with these addresses and when clicked the correct protocol is invoked.
 
Back
Top