網頁

2013年7月1日 星期一

web call client exe



解決方案,Registering an Application to a URL Protocol

練習例:
Office

Microsoft Lync Basic 2013 (64 位元)

Lync 2010 HTML URL Protocols for HREF tags

Command-Line Parameter Examples

InstanceResults
Tel:+14255550101Opens a phone-only view with +14255550101.
Callto:tel:+ 14255550101Opens a phone-only view with +14255550101.
Callto:sip:kazuto@litwareinc.comOpens a phone-only view with kazuto@litwareinc.com.
sip:kazuto@litwareinc.comOpens a Conversation window with kazuto@litwareinc.com.

Hey, that looks the same as our list of protocols available, and they give examples to boot!
 For example the behavior of callto: in this example:
<a href=”callto:sip:ootycorp@microsoft.com”>Click Here to Call</a>
Results in the contact to be pulled up like this:






以下為舊方法:(IE only)

Web下呼叫client端執行檔

    

    function runSCCMEXE()
    {
        var WshShell = new ActiveXObject("Wscript.Shell");
        WshShell.Run("D:\\SCCM_REMOTE.EXE"); // 執行檔案
        WshShell.Quit;
        
    }
    function runLync()
    {
        var WshShell = new ActiveXObject("Wscript.Shell");
        WshShell.Run("lync"); 
        WshShell.Quit;
        
    }
    function runIE()
    {
        var WshShell = new ActiveXObject("Wscript.Shell");
        WshShell.Run("explorer http://www.google.com"); // 開啟IE,連線至Google
        WshShell.Quit; 
     }
 
Click here to Execute your file


使用ActiveX還有一個安全性的問題,通常都會被瀏覽器擋掉。
必須開啟瀏覽器設定安全性。
以IE9設定為例:
開啟IE→網際網路選項→安全性→信任的網站→自訂等級
自訂等級:

將未標示成安全的ActiveX控制項初始化並執行指令碼→"提示"或"啟用"
使用"啟用"不會出現提示視窗,會直接載入ActiveX,至於安全性就請各位自行衡量。

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。