:: :: input.cmd - get user input and store in a variable :: @echo off SETLOCAL SET v_prompt=%1 ECHO Wscript.Echo Inputbox("Enter %v_prompt%","Input Required")>%TEMP%\~input.vbs :s_GetInput FOR /f "delims=/" %%G IN ('cscript //nologo %TEMP%\~input.vbs') DO set v_string=%%G IF not defined v_string goto s_GetInput DEL %TEMP%\~input.vbs SET v_string ENDLOCAL & SET v_input=%v_string%