欢迎莅临 SUN WU GANG 的园子!!!

世上无难事,只畏有心人。有心之人,即立志之坚午也,志坚则不畏事之不成。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
代码实现==》
<html> 
<head> 
<script language="javascript"> 
function Run(strPath) 
{ 
var objShell = new ActiveXObject("wscript.shell"); 
objShell.exec(strPath); 
objShell = null; 
} 
</script> 
</head> 
<body> 
请输入要运行的程序路径:<br> 
<input name=exe type=text size=20 value= "E:\\DCWeb\\PrinterBarcode\\PrinterBarcode\\PrinterBarcode\\bin\\Debug\\PrinterBarcode.exe"\"%1\";> 
<BUTTON class=button onclick="Run(exe.value)">确定</BUTTON> 
</body> 
</html>
reg_test.reg文件==》

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\HelloWorld] @="HelloWorld Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\HelloWorld\DefaultIcon] @="E:\\HW_TEST\\HelloWorld.exe,1" [HKEY_CLASSES_ROOT\HelloWorld\shell] @="" [HKEY_CLASSES_ROOT\HelloWorld\shell\open] @="" [HKEY_CLASSES_ROOT\HelloWorld\shell\open\command] @="\"E:\\HW_TEST\\HelloWorld.exe\" \"%1\""

注意:E:\\DCWeb\\PrinterBarcode\\PrinterBarcode\\PrinterBarcode\\bin\\Debug\\PrinterBarcode.exe——需要启动的程序

运行方式:helloworld://hello_world/Apara=abc&Bpara=001

实例下载地址:http://download.csdn.net/detail/u010713920/9643071

posted on 2016-09-29 15:16  sunwugang  阅读(1780)  评论(0编辑  收藏  举报