|
|
|
@ -195,6 +195,8 @@ namespace MediaBrowser.ServerApplication
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static bool IsAlreadyRunningAsService(string applicationPath)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var serviceName = BackgroundService.GetExistingServiceName();
|
|
|
|
|
|
|
|
|
@ -220,6 +222,11 @@ namespace MediaBrowser.ServerApplication
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (COMException)
|
|
|
|
|
{
|
|
|
|
|
// Catch errors thrown due to WMI not being initialized
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|