The user puts forward a requirement that the locally installed C/S structure software should be called out. Note: instead of clicking its shortcut or exe file, you need to call the software client by clicking a button or link on the webpage. I have found relevant information on the Internet. There are two common solutions... SyntaxHighlighter. all ();
The user puts forward a requirement that the locally installed C/S structure software should be called out.
Note: instead of clicking its shortcut or exe file, you need to call the software client by clicking a button or link on the webpage. I have found related information on the Internet and have two common solutions.
1. Use js Code for debugging. The Code is as follows:
[Javascript]
Function Run (strPath ){
Var objShell = new ActiveXObject ("wscript. shell ");
ObjShell. Run (strPath );
ObjShell = null;
}
Call QQ Program
In this way, ActiveX script programs are used to control program calls. However, there is a security issue. You need to adjust the security level of the browser. In addition, you need to restrict the installation path of local software, which brings great trouble to the customer. If the customer's software is not installed in D:/Program % 20 Files/QQ path, the path cannot be found, which lacks flexibility and is not desirable.
2. Use a java program to write a panel, but it is difficult and the user experience is not good. The basic code is as follows:
[Java]
Public static void main (String [] args) throws Exception {
Process p = runtime.getruntime(cmd.exe c (
"\" C:/program files/http://dev.21tx.com/ OS /windows/ "target =" _ blank "> Windows/notepad.exe \"");
P. waitFor ();
}
}
In this way, you can call the local bat program or exe program, which is also a security problem and path problem. There may be stability problems, and this method is not available.
In the end, it was achieved by a widget of longtu software company. The steps are as follows:
1. Install the control.
2, plusThe Code is as follows:
[Java]
Classid = "clsid: A3E8EEE9-E85E-472A-AEB3-EB182A605C62"
Codebase = "/$ {res}/ocx/AppCallerXControl. ocx # version ="
Width = "0"
Height = "0"
Visible = "0"
Id = "AppCaller"
>
/$ {Res}/ocx/AppCallerXControl. ocx indicates the control path, id indicates the control object, and you can call methods in the control class.
[Java]