diff --git a/Flow.Launcher/Helper/WindowsMediaPlayerHelper.cs b/Flow.Launcher/Helper/WindowsMediaPlayerHelper.cs index 9d2046972..2da2cf034 100644 --- a/Flow.Launcher/Helper/WindowsMediaPlayerHelper.cs +++ b/Flow.Launcher/Helper/WindowsMediaPlayerHelper.cs @@ -1,11 +1,19 @@ using Microsoft.Win32; namespace Flow.Launcher.Helper; + internal static class WindowsMediaPlayerHelper { internal static bool IsWindowsMediaPlayerInstalled() { - using var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MediaPlayer"); - return key?.GetValue("Installation Directory") != null; + try + { + using var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MediaPlayer"); + return key?.GetValue("Installation Directory") != null; + } + catch + { + return false; + } } }