Don't fail old service cleanup
diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx
index 57f9f3d..aa41bcb 100644
--- a/win/winvnc/winvnc.cxx
+++ b/win/winvnc/winvnc.cxx
@@ -170,8 +170,16 @@
i = argc;
// Try to clean up earlier services we've had
- rfb::win32::unregisterService("WinVNC4");
- rfb::win32::unregisterService("TigerVNC Server");
+ try {
+ rfb::win32::unregisterService("WinVNC4");
+ } catch (rdr::SystemException) {
+ // Do nothing as we might fail simply because there was no
+ // service to remove
+ }
+ try {
+ rfb::win32::unregisterService("TigerVNC Server");
+ } catch (rdr::SystemException) {
+ }
if (rfb::win32::registerService(VNCServerService::Name,
_T("TigerVNC Server"),