Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

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