Last active
September 15, 2019 00:27
-
-
Save deskobj/4757337 to your computer and use it in GitHub Desktop.
Desktop Objects: Launch TightVNC using the Computer Name - or - How to Get IP from Computer Name in MS-DOS Batch -- https://p19z.blogspot.com/2009/01/launch-tightvnc-using-computer-name.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@setlocal | |
@ping -n 1 %~2 | find "Pinging" > %TEMP%\ADDR_IPv4.txt | |
@for /F "tokens=2 delims=[]" %%a in (%TEMP%\ADDR_IPv4.txt) do @set ip=%%a | |
@endlocal & set "%~1=%ip%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM USAGE: @call StartVncViewer MyComputerName | |
@setlocal | |
@call GetIpFromName ip "%~1" | |
@pushd C:\Progra~1\TightVNC | |
@start vncviewer.exe %ip% | |
@popd | |
@endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment