@%COMSPEC%\..\ping.exe -n 1 %~1 | %COMSPEC%\..\find.exe "Pinging" > %TEMP%\TEMPIP.txt
@for /F "tokens=2 delims=" %%a in (%TEMP%\TEMPIP.txt) do set _GetIp=%%a
Then we need to call 'GetIpFromName.bat' and launch VncViewer. I called the script 'StartVncViewer.bat'.
Finally, if I often need to access a computer called, say, Bambi, I create a script called 'VncBambi.bat' on my desktop.