我有一个非常简单的 HTA 代码,它在 WinPE 5.1 下运行时生成一个菜单,基本上它只是屏幕上的 5 个按钮,每个按钮都应该调用一个 CMD 文件,但是没有任何反应。
<head>
<title>Recovery</title>
<HTA:APPLICATION
APPLICATIONNAME="Recovery"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
maximizeButton="no"
minimizeButton="no"
icon="HTA\sbicon.ico"
>
</head>
<script language="VBScript">
'Sub Window_onLoad
'window.resizeTo 400,250
'End Sub
Sub Createimage
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "x:\windows\system32\cmd.exe /c START /MIN image.cmd", 1 ,TRUE
End Sub
</script>
<script language="VBScript">
Sub RecoverPart
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "x:\windows\system32\cmd.exe /c START /MIN part.cmd", 1 ,True
End Sub
</script>
<script language="VBScript">
Sub RecoverUSB
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "x:\windows\system32\cmd.exe /c START /MIN usb.cmd", 1 ,TRUE
End Sub
</script>
<script language="VBScript">
Sub Reboot
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "X:\windows\system32\cmd.exe /c START /MIN restart.cmd", 1 ,TRUE
End Sub
</script>
<script language="VBScript">
Sub Shutdown
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "x:\windows\system32\cmd.exe /c START /MIN shutdwn.cmd", 1 ,TRUE
End Sub
</script>
<body bgcolor="#003E67">
<center><img src="HTA\Smartbox2.jpg"/>
<br><br><br>
<input type="button" value="Create Image" name="run_button" onClick="Createimage" style="Width: 300px; height: 75px; font-family: roboto; font-size: 25px;"><br><br>
<input type="button" value="Recover From Partition" name="run_button" onClick="RecoverPart" style="Width: 300px; height: 75px; font-family: roboto; font-size: 25px;"><br><br>
<input type="button" value="Recover From USB" name="run_button" onClick="RecoverUSB" style="Width: 300px; height: 75px; font-family: roboto; font-size: 25px;"><br><br>
<input type="button" value="Restart Device" name="run_button" onClick="Reboot" style="Width: 300px; height: 75px; font-family: roboto; font-size: 25px;"><br><br>
<input type="button" value="Shutdown Device" name="run_button" onClick="Shutdown" style="Width: 300px; height: 75px; font-family: roboto; font-size: 25px;"><br><br></Center>
</body>
任何帮助将不胜感激使 CMD 运行。
问候
C。