I'm trying to create a batch file that will ping a variable that is determined by the users input

e.g. "Enter PC Name:" pc name =123

Then it pings 123.domain.com

```
@echo off
set /p UserInputPath = Enter chosen PC: 

ping %UserInputPath%

ping MyServerName

PAUSE

```

`Ping MyServerName` works fine

But `ping %UserInputPath%` doesn't and just brings up the "Help" Menu for Ping in CMD

Any help would be appreciated
::::EDIT:::

```
ping %UserInputPath% -n 5

```

Returns this error: `IP address must be specified.`

Can you not a ping a hostname? (AS that is what i'm trying to do)

EDIT 2::

This is my latest:

```
@echo off
set /p UserInputPath = "Enter chosen PC: " 
PAUSE 

ping %UserInputPath%.store.domain.company.com

ping MyServerName

PAUSE

```