How to check if a particular version of flash player is installed or not in C#.? -


i want check code if particular version of flash player installed or not. used following code

using microsoft.win32  registrykey rk = registry.currentuser.opensubkey("hkey_local_machine\\software\\macromedia\\flashplayer");  if (rk != null) {     // it's there  } else {     // it's not there  }  

in registry if search flash player version 10.2.161.23, location

"hkey_local_machine\software\macromedia"

is having 2 folders:

  1. flashplayer and
  2. flashplayeractivex.

but, above code not working.

kindly let me know how check if particular version of flash player installed in system or not using c#.net.

adobe's old (pre 10) ie flash detection code used test in vbscript if instantiate object shockwaveflash.shockwaveflash.<major version>. if it's major version want test, can check keys under hkcr, e.g. hkey_classes_root\shockwaveflash.shockwaveflash.10.

swfobject instantiates version-less object name, shockwaveflash.shockwaveflash, , queries $version property. in c#:

// flash object type registry var type = type.gettypefromprogid("shockwaveflash.shockwaveflash"); if (type == null) {   // no flash   return; }  // create flash object query // (should try/catch around createinstance) var flashobject = activator.createinstance(type); var versionstring = flashobject.gettype()                       .invokemember("getvariable", bindingflags.invokemethod,                                     null, flashobject, new object[] {"$version"})                     string; // e.g. "win 10,2,152,26"  // clean allocated com object marshal.releasecomobject(flashobject); 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -