我的 hta 文件上有一个按钮,当我点击它时会触发批处理文件运行。我希望用户在文本框中输入计算机名称,并在下面需要计算机名称的 psexec 命令中使用它。任何建议将不胜感激。
<script language="VBScript">
Sub InstallVNC
dim shell
set shell=createobject("wscript.shell")
shell.run "psexec -u domain01\username -p password \\textbox1.value -c \\doamin\SHARE\SOFTWARE\install_program.bat"
End Sub
<body bgcolor="buttonface">
<p><font face="verdana" color="red">Application Installer</font></p>
Please run as administrator. <p>
<form name="test">
<font>Computer Name:</font>
<input type="text" name="textbox1" id="textbox1">
</form>
<input id=runbutton class="button" type="button" value="Install VNC" name="db_button" onClick="installvnc"><p>
</body>
</html>