I would like to implement the following behaviour:
I have a special media player, that is capable to play Internet streams (types of streams is not important, we can consider these are simply media files). A person X has a number of links to such streams, and the person will prepare HTML pages with the links according to my rules.
The goal is: if a user click such link in a browser, then presence of installed my application is checked.
-
If the application is not installed, then the user is prompted to install my application. After the user agrees to install, the application is installed (through remote msi) and is launched with a string as command line parameters.
-
If the application is installed, then it is launched with a string as command line parameters.
I suppose, that one of the way to implement this is to write ActiveX control (that actually is not control, because the ActiveX will not contain UI elements except some messageboxes). The ActiveX will check whether my app is installed, prompt to install the app if necessary; launch installer; launch installed app. The questions are:
- What another approaches can be applied (besides AciveX)?
- I did not write AciveX controls. What start points (useful links) you can recommend for writing such ActiveX (taking into account, that it will be coded in MSVC++)?
- Some another remarks or recommendations?
Thanks in advance.
Using ActiveX would not be cross-browser compatible, although you could develop plugins for each of the major browser this would still require installation or authorisation by the user. I’m afraid you’re going to find this rather difficult unless you’re happy to cut one of your requirements (e.g. the first).
To fulfill the second requirement, you should look into registering a custom URL protocol handler. Then you can launch your installed application from a simple link:
For users that don’t have your application installed, however, the URL wouldn’t work. One workaround for IE (since you mentioned ActiveX) would be to have your application append to the user agent string, then check for the existence of this string with your server-side or client-side code. If it’s not there then you know your application is installed.