After more 2 000 000 (two million) views on forum for 1.5.0.x development versions... and 1.6.1.0, 1.6.3.0-dev versions
A new stable version, UltraVNC 1.6.4.0 and UltraVNC SC 1.6.4.0 have been released: https://forum.uvnc.com/viewtopic.php?t=38095
Feedback is always welcome

2025-12-14: 1.7.1.X-dev release builds need tests and feedback: https://forum.uvnc.com/viewtopic.php?t=38134

2025-12-02: We need help: English Wikipedia UltraVNC page has been requested to deletion: https://forum.uvnc.com/viewtopic.php?t=38127
Any help is welcome to improve the UltraVNC page and/or to comment on the Wikipedia Talk page

2025-05-06: Forum password change request: https://forum.uvnc.com/viewtopic.php?t=38078

2023-09-21: Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Development: UltraVNC development is always here... Any help is welcome
Feedback is welcome

Keep alive / auto reconnect script

Single Click discussions / bugs
Post Reply
operat0r
8
8
Posts: 11
Joined: 2005-12-09 04:08

Keep alive / auto reconnect script

Post by operat0r »

Hello just thought I would drop this uber code auto reconnects when you get dropped :o

NOTE: change the bellsouth part to your ip or domain name etc ..
NOTE: you also need kill.exe ( from NT reskit.zip )

[syntax="batch"]
@echo off

:loop
netstat | find "bellsouth" | find "EST" > nul
if errorlevel 1 goto restartvnc
cls
echo Keeping VNC connection alive
echo Time %time%
netstat | find "bellsouth" | find "EST"

ping 1.1.1.1 > %temp%\null

goto loop

:restartvnc

echo Connection lost Killing VNC Processes...
kill winvnc.exe

ping 1.1.1.1 > %temp%\nullnull



echo Reconnecting ...
start winvnc.exe

ping 1.1.1.1 > %temp%\nullnull
ping 1.1.1.1 > %temp%\nullnull
ping 1.1.1.1 > %temp%\nullnull
ping 1.1.1.1 > %temp%\nullnull

goto loop
[/syntax]

[mod=494,1134181391]replaced code by syntax=batch[/mod]
Last edited by operat0r on 2005-12-10 02:23, edited 1 time in total.
operat0r
8
8
Posts: 11
Joined: 2005-12-09 04:08

*** FIX

Post by operat0r »

found with XP it times out sort of new script not useing ping for timer



* you need kill.exe ( nt reskit ) and timeout.exe
Why did this get locked ?

[syntax="batch"]

@echo off

:loop
netstat | find "bellsouth" | find "EST" > nul
if errorlevel 1 goto restartvnc
cls
echo Keeping VNC connection alive
echo Time %time%

Timeout.exe 60

goto loop

:restartvnc

echo Connection lost Killing VNC Processes...
kill winvnc.exe

Timeout.exe 10


echo Reconnecting ...
start winvnc.exe

Timeout.exe 60

goto loop

[/syntax]
[mod=494,1134598358]replaced bbcode code by syntax=batch[/mod]
Last edited by operat0r on 2005-12-14 22:12, edited 3 times in total.
hicksticks2001
8
8
Posts: 8
Joined: 2006-03-17 20:08

How to embed?

Post by hicksticks2001 »

How do you get this batch file to integrate into SC so it loads when SC loads?

-Aaron
Post Reply