What I have below allows a user to enter the name of a device, from a batch Menu, which will then telnet in a new command window and automatically log them in. After the below batch runs I then want the user to be prompted for a new variable (Host). Once the user enters the new variable (Host) I want the batch to continue on, within the same window, and ping the new variable (Host).

I tried the call command but it opens a new window every which way i try it. Do I need a vbscript? I'm a bit lost.

@echo off
:A
color 0A
Cls
echo.
echo.
echo.
echo Putty SSH
echo.
echo.
echo.
set /p computer=HOST:
start putty.exe -ssh xxxxxx@%computer% -pw xxxxxx
gotoptions


Example of what I want to come next. I do not know how to add the lines below to the batch script above and make them execute in the window opened by "start putty.exe -ssh xxxxxx@%computer% -pw xxxxxx". I want the %computer% to be a new variable. Not from the variable in the batch above.

set /p computer=HOST:
ping %computer%