各位大侠:我使用VBScript加载一个bat文件。代码如下:咋加载不了,请各位指点一下。
<JOB ID="vbs">
<Head>
<HTA:APPLICATION
ID="vbs"
/>
<SCRIPT LANGUAGE="VBScript">
Sub buttonClick
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%com spec% /K C:\\path\\to\\the\\file\\start.bat", 0
' 0 => hide
MsgBox("File bop.txt successfully generated")
End Sub
</SCRIPT>
</HEAD>
<HTML>
<FORM NAME="Form1">
<INPUT TYPE="Button" NAME="Button1" VALUE="Run" ONCLICK="buttonClick">
</HTML>
</JOB>
<JOB ID="vbs">
<Head>
<HTA:APPLICATION
ID="vbs"
/>
<SCRIPT LANGUAGE="VBScript">
Sub buttonClick
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%com spec% /K C:\\path\\to\\the\\file\\start.bat", 0
' 0 => hide
MsgBox("File bop.txt successfully generated")
End Sub
</SCRIPT>
</HEAD>
<HTML>
<FORM NAME="Form1">
<INPUT TYPE="Button" NAME="Button1" VALUE="Run" ONCLICK="buttonClick">
</HTML>
</JOB>