好吧,所以我正在创建一个简单的程序,当你点击链接打开另一个.HTA文件时。例如:
Sub RunProgram
Const NORMAL_WINDOW = 1
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "explorer.exe", "Virus_Support.hta", , , NORMAL_WINDOW
End Sub
然后在......
<body>
<button onclick="RunProgram">Run Program</button> <p>
</body>
但是,它返回'Variable is undefined:objShell'错误。我试图从supportMain.hta文件中打开virus_support.hta ...而不是在IE或任何浏览器上打开。
答案 0 :(得分:0)
试试这个:
Sub RunProgram
Set objShell = CreateObject("WScript.shell")
objShell.run("Virus_Support.hta")
End Sub