Permalink
Browse files

Don't fail old service cleanup

  • Loading branch information...
1 parent 6ec09fe commit c7860c2cb66f2752119a6557bd58a1c672b96716 @CendioOssman CendioOssman committed Aug 18, 2016
Showing with 10 additions and 2 deletions.
  1. +10 −2 win/winvnc/winvnc.cxx
View
@@ -170,8 +170,16 @@ static void processParams(int argc, char** argv) {
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"),

0 comments on commit c7860c2

Please sign in to comment.