I have a batch file that runs and calls .vbs file called "SelectNBType.vbs" The mentioned .vbs file prompt a small UI output for the user to input a string as shown.
///Start of Batch file///
For /F "Tokens=2 Delims=" %%I In ('cscript //nologo SelectNBType.vbs') Do
Set _NBType=%%I
IF %_NBType%==n (
Echo Normal
)
IF %_NBType%=="c" (
Echo Common
)
And the .VBS as below
////Start of .VBS file
titletext = "Select Notebook Type"
prompttext = "Enter NB Type"
NBType = inputbox(prompttext & chr(13) & " (Type n if NORMAL user NB)" &
chr(13) & " (Type n if COMMON/POOL user NB)", titletext)
if NBType = "n" Then
x=MsgBox ("You have selected a Normal Notebook",0+32,"Notification")
WScript.Quit 1
elseif NBType = "c" Then
x=MsgBox ("You have selected a Common/Pool Notebook",0+32,"Notification")
End If
I am trying to figure out a way to allow the .vbs file to return the output entered by the user as a string to the batch file so that it can be used later in the batch file in the if conditions as shown.
Thanks