I am trying to achieve similar to this When the 'Play' button is clicked, it detect whether 'Roblox' application is installed on client machine or not. If it is not installed, it prompt the user to download and install it. I have my web application build in MVC C# and a WinForm Application(.exe) C#. I am trying to launch .exe when a button is clicked on the web page in browser. If the .exe is not installed, prompt the user to download and install the .exe. If it is already installed, then launch it. I have followed these steps, but did not understand how to check if .exe is already installed on client machine or not. Do I have to create a browser Plugin or Extension to achieve this. Please advice.
Asked
Active
Viewed 626 times
0
-
Search for "Magnet Links" https://en.wikipedia.org/wiki/Magnet_URI_scheme – Volpato Jul 16 '18 at 18:10
-
No, that did not help me – shravan bardwa Jul 17 '18 at 13:12
1 Answers
0
So, after 1 week hunting over the internet, I found the solution.
From Google Chrome -
- Create an extension using native messaging like here (skip the registry part in this step). This extension will be used to send message to the registry.
- If you haven't published the extension on Google Chrome store, then on the web page, use chrome.runtime.sendNativeMessage to check whether the extension is installed or not. If you get positive response, it means extension is already installed.
- If the extension is published, see here how to detect and launch extension in google chrome
- Create your desired .exe and a setup. Make sure to create registry values while developing setup project. (see here) Registry value will have the path to .exe
- Finally, when the extension is launched, it looks for registry values and .exe path in the registry and the .exe is launches.
For Mozilla Firefox - Create Firefox native messaging extension and follow the same steps above.
Hope this helps to my friends. Cheers!!!

shravan bardwa
- 37
- 2
- 11