<SCRIPT language=JavaScript>
function Run(strPath) {
exe.value=strPath;
try {
var objShell = new ActiveXObject("wscript.shell");
objShell.Run(strPath);
objShell = null;
}
catch (e){alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确,而且所需的库文件均可用。')
}
}
</SCRIPT>
<BUTTON class=button onclick="Run('notepad')">记事本</BUTTON><br>
function Run(strPath) {
exe.value=strPath;
try {
var objShell = new ActiveXObject("wscript.shell");
objShell.Run(strPath);
objShell = null;
}
catch (e){alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确,而且所需的库文件均可用。')
}
}
</SCRIPT>
<BUTTON class=button onclick="Run('notepad')">记事本</BUTTON><br>
wshell.run "D:\Progra~1\WinRAR\WinRAR.exe x "&server.mappath("search.rar")&" G:\Science_Site\ready\test",0,false
有安全性限制,有的杀毒软件会把这个当病毒的。