function Run(strPath)  //only for ie
{   
           try   
           {   
             var objShell = new ActiveXObject("wscript.shell"); 
             objShell.CurrentDirectory="E:\\YOURPATH\\C++\\CHelloWord 3\\Debug\\";
             //设置当前路径很重要,能让exe程序解决 相对路径问题 (否则会在html所在路径找)
             objShell.Run(strPath);   
             objShell = null;   
           }  catch(e){ 
                alert(e.message);  
           }   
 
} 
    
<a href="#" onclick="Run('CHelloWord3.exe')">RUN EXE</a>   

 

相关文章:

  • 2021-04-06
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-11-30
  • 2021-09-20
  • 2022-12-23
  • 2021-06-26
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
相关资源
相似解决方案