有没有办法从* .vbs启动* .bat,然后将用户命令行输入到* .bat变量并将其返回给vbscript代码?
提前致谢。
亲切的问候。
托米
答案 0 :(得分:1)
Set Arg = WScript.Arguments
set WshShell = createObject("Wscript.Shell")
Set Inp = WScript.Stdin
Set Outp = Wscript.Stdout
Sub ShowMenu
Do
ShowHelpMenu
Answ=Inp.readline
If Answ = "1" Then
ShowGeneralHelp "TEXT"
Elseif Answ = "2" Then
ShowGeneralHelp "HTML"
Elseif Answ = "3" Then
Version
Elseif Answ = "4" Then
History
Elseif Answ = "5" Then
Exit Do
End If
Loop
End Sub
运行
cscript //nologo 'c:\somefile.vbs"