使用一個VBScript(只是一個例子)像我需要使用VBScript來控制一個命令行程序
result = MsgBox ("Would you like to install the AntrixAPI?", vbYesNo, "Installing AntrixAPI")
Select Case result
Case vbYes
MsgBox("The API will be installed.")
Case vbNo
MsgBox("The API will not be install.")
End Select
我怎麼能使用它來控制一個命令行程序幫助。假設用戶選擇了是。那麼只有當用戶選擇是時,命令纔會到達某個點。 (示例命令)
@echo off
:UserSelectedYes
REM This is where the prompt would go if the user selected yes
wget http://www.example.com/thisisafakedomain/api/antrix
:UserSelectedNo
REM This is where the prompt would go if the user selected no
end
這可能嗎?
您可以試試[this](http://stackoverflow.com/a/21575421/2861476) –
這正是我想要的。 100%謝謝SOOO很多 – SmokingNumbers
可能的重複[將vbYesNoCancel的輸出傳遞到批處理中](http://stackoverflow.com/questions/21574341/passing-the-output-of-vbyesnocancel-into-a-batch) –