Reputation: 31
is there a way to start a *.bat from a *.vbs, then get the users command line input into a *.bat variable and give it back to vbscript code?
Thanks in advance.
Kind regards.
Tommy
Upvotes: 0
Views: 632
Reputation:
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
To run
cscript //nologo 'c:\somefile.vbs"
Upvotes: 1