代码实现==》
<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
博客内容主要用于日常学习记录,内容比较随意,如有问题,还需谅解!!!

浙公网安备 33010602011771号