使用一个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) –