From ed92079eb6a7ee7a473cc6b17b10578e10426c88 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 13 Jun 2016 13:05:21 +0200 Subject: [PATCH] Clean up old WinVNC services We've changed the service name a couple of times for various reasons. Make sure the old versions are removed when the new one is registered. --- win/winvnc/winvnc.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx index ff16aacd..57f9f3d4 100644 --- a/win/winvnc/winvnc.cxx +++ b/win/winvnc/winvnc.cxx @@ -168,6 +168,11 @@ static void processParams(int argc, char** argv) { runServer = false; int j = i; i = argc; + + // Try to clean up earlier services we've had + rfb::win32::unregisterService("WinVNC4"); + rfb::win32::unregisterService("TigerVNC Server"); + if (rfb::win32::registerService(VNCServerService::Name, _T("TigerVNC Server"), _T("Provides remote access to this machine via the VNC/RFB protocol."), -- 2.39.5