diff options
Diffstat (limited to 'MediaBrowser.ServerApplication')
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 27eb3e0e17..d17d9ee435 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -134,10 +134,17 @@ namespace MediaBrowser.ServerApplication private static bool IsServiceInstalled() { - var serviceName = BackgroundService.GetExistingServiceName(); - var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == serviceName); + try + { + var serviceName = BackgroundService.GetExistingServiceName(); + var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == serviceName); - return ctl != null; + return ctl != null; + } + catch + { + return false; + } } /// <summary> |
