首页 > 编程 > HTA > 正文

运行程序的hta

2020-01-31 15:44:29
字体:
来源:转载
供稿:网友

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>工具栏</title>
<style>
<!--
body, table, p, td, div,select { font:menu}
.button {boder:0; HEIGHT: 20px;width:60px;cursor:hand;font:menu}
-->
</style>
</head>

<body>
<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>
<p>请保存为HTA文件,再运行<br>
请输入要运行的程序:<br><input name=exe type=text size=20 value="regedit"><BUTTON class=button onclick="Run(exe.value)">确定

</BUTTON><BUTTON class=button onclick=exe.value="";>重新输入</BUTTON><br>
<BUTTON class=button onclick="Run('notepad')">记事本</BUTTON><br>
<BUTTON class=button onclick="Run('mspaint')">画图板</BUTTON><br>
<BUTTON class=button onclick="Run('calc')">计算器</BUTTON><br>
<BUTTON class=button onclick="Run('cmd')">cmd</BUTTON><br>
<BUTTON class=button onclick="Run('Regedit')">Regedit</BUTTON><br>
<BUTTON class=button onclick="Run('Msconfig')">Msconfig</BUTTON><br>
<BUTTON class=button onclick="Run('file:///D:/Program%20Files/Winamp/WINAMP.EXE')">WINAMP</BUTTON><br>
<BUTTON class=button onclick="Run('IEXPLORE.EXE')">IE</BUTTON><br>
<BUTTON class=button onclick="Run('..')">..</BUTTON><br>
<BUTTON class=button onclick="Run('%windir%')">%windir%</BUTTON><br>
<BUTTON class=button onclick="Run('%temp%')">%temp%</BUTTON><br>
</p>
</body>

上一篇:XMLHttps

下一篇:返回列表

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表