summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-06-13 13:05:21 +0200
committerPierre Ossman <ossman@cendio.se>2016-06-13 13:05:21 +0200
commited92079eb6a7ee7a473cc6b17b10578e10426c88 (patch)
treea30afa81333ba4fe3d61f22e402bf06b69ecd906
parentab2224f1d45add51eb06d4487bda0f4e6593ff9c (diff)
downloadtigervnc-ed92079eb6a7ee7a473cc6b17b10578e10426c88.tar.gz
tigervnc-ed92079eb6a7ee7a473cc6b17b10578e10426c88.zip
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.
-rw-r--r--win/winvnc/winvnc.cxx5
1 files changed, 5 insertions, 0 deletions
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."),