Requirement . We want to launch an external comparison tool (for example, BeyondCompare or WinMerge) from a web page using a button or link. The paths of text files must be transferred to the tool when it is run, so it understands them and opens them in the left and right comparison panels.
Tried Solutions :
1) Using JavaScript ActiveXObject : in this case, the user can simply click the button / link and launch the comparison tool installed on his machine. But it only works in Internet Explorer, so we cannot go with this.
Link: How to run an external program, for example. notepad using a hyperlink?
2) Using a Java applet . Due to security concerns, applets embedded in the browser are not allowed to access the local file system, and this will result in an “access control exception”. Therefore, we, too, cannot handle this.
Link: Why is my applet throwing an AccessControlException?
3) Using a protocol handler . We can configure our own URL protocol to run the program. Just as we use the mailto: user@email.com syntax used to create email links, it will automatically launch Outlook on Windows. "mailto" is a predefined protocol in the Windows registry.
In the same way, we created our own protocol, for example, "launchCompareTool" in the registry and were able to launch any application, such as WinMerge or BeyondCompare. However, we cannot get left and right file paths as arguments for the application. Maybe the launch of the application should expect these arguments.
Link: http://www.dreamincode.net/forums/topic/220444-run-program-from-server-on-client-computer/ http://msdn.microsoft.com/en-us/library/aa767914% 28v = vs. 85% 29.aspx # app_reg
Unlike the mailto protocol, which has the "body" and "subject" arguments passed to the mail client (for example, Outlook), which understands them. These comparison tools do not have arguments that can be passed from the protocol.
Is there any other way to satisfy this requirement?
Thanks, Abdul