How can I make my application check if Adobe flash player is installed on a PC?

后端 未结 3 1102
梦如初夏
梦如初夏 2021-01-21 23:15

My application needs Adobe Flash Player to function properly and I need it to check whether it\'s installed or not.

So how can I make my application check if Adobe flash

相关标签:
3条回答
  • 2021-01-21 23:43

    Check if this registry key exists:

    \HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer
    

    Then, you can check the installed version (if installed) from here:

    \HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer\CurrentVersion
    

    Here you can find code on how to check existence of registry key.

    0 讨论(0)
  • 2021-01-21 23:47

    Following code return current version string of flash.

    private string GetFlashPlayerVersionString()
    {
        RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Macromedia\FlashPlayer");
        if (regKey != null)
        {
            string flashVersion = Convert.ToString(regKey.GetValue("CurrentVersion"));
            return flashVersion;
        }
        return string.Empty;
    }
    
    0 讨论(0)
  • 2021-01-21 23:50

    Open the Flash folder (C:\Windows\System32\Macromed\Flash) and whatever is listed there would be your Flash Player files.

    0 讨论(0)
提交回复
热议问题