mscomm32.ocx : file is missing or invalid


  • Hi when installing a visual basic 6 project in Vista 32/64, the process completes fine but when i try to execute the file after i get the error:
    "component 'mscomm32.ocx' or one of its dependencies not correctly registered: a file is missing or invalid".

    I have made sure i have the control in the correct place and that it is registered fine aswell. Any ideas?
    Monday, January 15, 2007 4:24 PM


All replies

  • Hi,

     This could be a VISTA problem!!

    Having read this >>


    it appears to suggest it is a VB6 component, if so then re-install VB6.

    Otherwise find the vendor for the file.

    See also.>>






    Wednesday, January 17, 2007 2:03 AM
  • YimTaka,

    When installing a Visual Basic 6.0 application on Vista, you need to be an admin and run elevated (right click on the exe or shortcut and select "Run as Admin").  You'll need to do this when installing the IDE and SP6 on your box as well.

    When running VB6 applications on Vista, you'll need to run under these settings (Admin/Elevated).

    Please let me know if you are having issues installing/running under these conditions.



    Chris Mayo

    Visual Basic Program Manager


    Wednesday, February 07, 2007 5:43 PM
  • Hi All,
    I had the same problem.
    I found a workaround: if I don't run my application as an administrator (but still using an administrator account), it works fine.
    The problem is that I need to run it as an administrator for other components of my project to work...
    Any idea how I can get mscomm32.ocx to work when I run my app as an administrator?
    I find all this very confusing.

    Thursday, March 01, 2007 11:09 AM

    I believe this is a Vista bug.


    I had the same problem from a customer who installed my program on his brand new Toshiba with Vista Home. Doing the regsvr32 thing did not get it to work. Running Adminitrator privilege and WinXP compatibility also did not work.


    The solution which is very surprising and weird, do not make sense at all is to UNREGISTER the OCXs. I managed to solve my customer problem with the steps I found in this Intuit TurboTax support forum. The actual solution to unregister is found in page 4 of this thread.




    As programmers, our immediate reaction would be to register the OCXs. Won't work.


    Friday, April 13, 2007 7:10 AM
  • Hi Chris,


    I have (as others) have encountered similar problems (error 339).  Please see post:  http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1499007&SiteID=1


    I have tested my application which uses a dcube3.ocx - installed with Installshield.   It works well under Windows Vista Hoe Premium - but I get a error 339 when I run it under Vista Enterprise.   Angelo discovered that using the msiexec /i <MSI file path> ALLUSERS=TRUE resolved his 339 problem.   


    In general how do I use the msiexec command to install an application with ALLUSERS=TRUE?


    Also,  why would the installtion work on Vista Home Premium and not Vista Enterprise?




    David Reeves


    Friday, April 20, 2007 5:00 PM



    I've never heard of the Enterprise Edition is this another name for what is sold as the Business Edition here in the UK?


    I only know of;

    • HOME

    editions of Vista.







    Friday, April 20, 2007 11:47 PM



    I've never heard of the Enterprise Edition is this another name for what is sold as the Business Edition here in the UK?"


    Well add Vista Enterise to your list:





    Tuesday, April 24, 2007 6:19 PM
  • For me I needed simply to register the file under the tools menu of access (2K).  That may be too basic to say in this forum but I figured I'd throw it out there.


    Regulus Black

    Wednesday, May 23, 2007 8:09 PM
  • This worked for me as well - VB6, SP6, under Vista Business - I just opened the components dialog, browsed to \system32\mscomm32.ocx and selected it, and it's working fine now.


    Monday, October 29, 2007 2:15 PM
  • Chris,


    I'm trying to help someone with this problem, but I'm doing it blind because I have never seen Vista Home Premium. Can you please give me more detail on this process? He's trying to install a program from CD.




    Patricia P


    Friday, December 21, 2007 9:55 PM
  • As mentioned before the solution does seem to be to unregister the MSCOMM32.OCX file. Worked for me on my Vista PC.

    1) Start a DOS prompt as an administrator.

    2) Type regsvr32 /u mscomm32.ocx

    That's it.


    Tuesday, November 23, 2010 11:25 AM