我有一个VBscript,它可以停止一个进程并启动它。
命令行中弹出一个是/否问题,我需要回答“是”
我怎么能务实地做到这一点?
到目前为止,我已经:
Option Explicit
Dim wshShell
On Error Resume Next
Set wshShell = WScript.CreateObject("WSCript.shell")
If Err.Number <> 0 Then
Wscript.Quit
End If
wshShell.Run "cmd.exe /C cd C:\WINDOWS\system32 & process.exe STOP"
WScript.Sleep 15000
wshShell.Run "cmd.exe /C cd C:\WINDOWS\system32 & process.exe START"
On Error Goto 0