开发者

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

开发者 https://www.devze.com 2023-02-03 09:27 出处:网络
My application needs Adobe Flash Player to function开发者_如何转开发 properly and I need it to check whether it\'s installed or not.

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 player is installed on a PC?

My program is written in C#


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.


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;
}


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

0

精彩评论

暂无评论...
验证码 换一张
取 消