Link to home
Start Free TrialLog in
Avatar of gcargile
gcargile

asked on

(VB.NET) How to check if Flash Player is loaded?

I need an expert... :)
Does anyone know how I can check to see if Flash Player is loaded in my Deployment Package?  Not sure what to check for in the registry... or if that's what I need to do.

THANKS FOR ALL YOUR HELP!
Avatar of NetPointer
NetPointer

in your deployment PACKAGE ???

or on your system?

Avatar of gcargile

ASKER

Sorry...  
I'm trying to create a Deployment package to check if the computer Im installing my software on has Flash Player - if not then I want a message to pop up saying they need to load it because my software has a .swf file in it.
Try this routine.  Feed it the name of a file, ie myflash.swf, and it returns the path of the executable that opens such a file.  It also detects if there's no file association for swf files.

http://www.vb2themax.com/Item.asp?PageID=CodeBank&ID=657
That looks pretty cool.... but, I'm not sure how I can use it exactly.  Every machine I load my program on may be different.  I'm wanting to see if Flash Player exists (which this code would do), but exists while I'm installing my program - so this code would not run yet right?
Sorry, I wasn't paying attention.  I thought you wanted to detect the existence of Flash Player within your program, but you want to do it as part of your Deployment, correct?

What you're trying to do is called 'Conditional Deployment'.  You'll want to set up a 'Launch Condition'.  From the MSDN help, "Launch conditions are used to evaluate a condition on a target computer and to halt installation if the condition is not met. Launch conditions can be set to check for the operating system version, existence of files, registry values, Window Installer components, the common language runtime, and Internet Information Services."

Once you've added your Deployment project, find it in the Solution Explorer, right-click it and choose 'View > Launch Conditions'.
Select 'Requirements on Target Machine'.
From the Visual Studio menu, choose 'Actions > Add Registry Launch Condition'.
You want to search for the class ID number for the Flash Player, which is D27CDB6E-AE6D-11cf-96B8-444553540000.
Modify the 'Search for RegistryEntry1'.  Set the Root to 'vsdrrHKCR' to search HKEY_CLASSES_ROOT.  Set the RegKey to 'D27CDB6E-AE6D-11cf-96B8-444553540000'.

If that doesn't solve your problem, at least it should be 99% solved.  Good luck :)
ASKER CERTIFIED SOLUTION
Avatar of brother7
brother7
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's exactly what I needed!!!  I will try it!  THANKS brother7!!!
Avatar of Bob Learned
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: brother7 {http:#9723481}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer