Distributing VB.Net app with Flash Player (AxIntrop and Interop included)

Posted on 2008-11-12
Last Modified: 2013-11-26
PROBLEM: My VB.Net app uses the Flash Player but will not run on a fresh Windows XP or Vista machine unless I install the flash player via Adobe's website or via the adobe flash player 10 install msi.  

I have added the flash player to my application which Visual Studio 2005 kindly created wrappers for (AxInterop.ShockwaveFlashObjects.dll and Interop.ShockwaveFlashObjects.dll)  These wrapped c:\windows\system32\macromed\flash\flash.ocx

The development machine has since been updated to flash 10 (c:\windows\system32\macromed\flash\flash10a.ocx).  

Part 1. it appears VS2005 now points to flash10a.ocx, but how can I make sure the wrappers do as well?
Part 2. The setup seems to automatically include the flash10a.ocx file.  The register property for this file is set to vsdrfDoNotRegister.  Should I switch it to vsdrfCOMSelfReg?
Part 3. Any reason why this would not work on it's own?   It is preferable to to not have to run the adobe msi or download the player to get this to work.
Question by:straubtm
    LVL 40

    Accepted Solution

    I doubt this is all good idea. What's going to happen if you wrap your very own flash, so yourapplication relies on it, and in several months the user updates hisflash to the next version? which is very likely.

    Flash player is now on everyone's machine, every website is using it. I think it would be wise to leave it to the user. All the websites that are using Flash are not shy to say "you need flash player to see this site, go and install from". You shouldn't be either.

    If you still decide that you must deliver Flash to the user yourself, I think all you have to do is add the version you want to the references of your project.

    >   The register property for this file is set to vsdrfDoNotRegister.  Should I switch it to vsdrfCOMSelfReg?
    the only reliable way to find out is to try both ways. By the way, the recommended way is to extract all the registry information from the COM object and create it by the installation - rather than allow the COM object to self-register.

    LVL 1

    Author Comment

    Unfortunately, the winform with the reference to the shockwaveflash obj crashes on initialization if flash is not installed.  So, trapping for it like you do on a website is not quite as easy.
    LVL 1

    Author Comment

    Okay, You've convinced me that my idea is not a good one.  
    I now plan on checking the registry for the existance of the Flash Player...
    (if HKCR\CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000} exists)
    and get the version number here... (HKLM\SOFTWARE\Classes\ShockwaveFlash.ShockwaveFlash\CurVer).

    If it doesn't exist or isn't the right version, how might I install the right version from the web?
    LVL 40

    Expert Comment

    by:Vadim Rapp
    Don't install the right version from the web. Adobe may change the address. User can be behind the proxy. Use may have no permission to install by policy. And so forth.

    msgbox "Dude, we need Flash Player here. Last time we saw it at Come back when you have installed it, ciao!",vbCritical
    LVL 1

    Author Comment

    Gotcha.  Well, I decided to use the Bootstrapper Manifest Generator from CodePlex and check to see if they have Flash installed via the registry.  If not, it downloads and installs the latest version from my website... Adobe granted me rights to redistribute it... so problem solved.  Thanks for helping me think this through.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now