Results 1 to 12 of 12

Thread: Error 339 - mswinsck.ocx not correctly registered

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Error 339 - mswinsck.ocx not correctly registered

    Hello, I use Inno setup to create an installer for my application. The application is used by more than 1000 people and I haven't received any messages about installation problems before, but now somebody says he gets the following error when using my app.

    Code:
    Runtime error 339 - Component 'mswinsck.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
    mswinsck.ocx is included in the installer and even the Package & Deployment Wizard doesn't show any extra dependencies. Should wsock32.dll be included in the installer as well? I don't know which OS is used, but I can ask.

    This is the line in the script. Is something wrong with that line?

    Code:
    Source: F:\Upload\Setup\VBFiles\mswinsck.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile uninsneveruninstall noregerror onlyifdoesntexist;

  2. #2
    Super Moderator
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Error 339 - mswinsck.ocx not correctly registered

    See what OS it is and let us know, simply looks like the winsock dll hasnt copied over. I suppose you should check they have permisions to install?

    Pino

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Error 339 - mswinsck.ocx not correctly registered

    The Winsock DLLs (there should actually be two on a modern system) are part of the OS. You don't deploy them.

    The error message is quite explicit: you have not installed and registered the Winsock control (OCX) properly.

  4. #4
    Super Moderator
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Error 339 - mswinsck.ocx not correctly registered

    Quote Originally Posted by dilettante
    The Winsock DLLs (there should actually be two on a modern system) are part of the OS. You don't deploy them.

    The error message is quite explicit: you have not installed and registered the Winsock control (OCX) properly.
    Can you not package the DLL's with your installer??

    Pino

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Error 339 - mswinsck.ocx not correctly registered

    Those DLLs are not redistributable. If they are missing or corrupted you'd go through a recovery process.

    How to determine and to recover from Winsock2 corruption in Windows Server 2003, in Windows XP, and in Windows Vista

    But the eror message above indicates nothing quite so dire. Instead it simply points to a faulty install process for an application.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: Error 339 - mswinsck.ocx not correctly registered

    The user is using Windows XP.

    I gave him the 'mswinsck.ocx' file and told him to put it in the system32 folder and manually register it with regsvr32 and now it works. But I still have no idea why it wouldn't install properly with the installation package. The installation package also contains 'mscomctl.ocx', 'richtx32.ocx' and 'msxml4.dll' and those files were installed correctly.

  7. #7
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Error 339 - mswinsck.ocx not correctly registered

    i am also distributing winsock with one of my project. no errors were reported yet.

    this is how the innosetup script looks like

    Code:
    ;Source: "D:\mysoftware\distribusion\MSWINSCK.OCX"; DestDir: "{sys}"; Flags: regserver restartreplace sharedfile;
    restartreplace is an important flag. have you put that?

  8. #8
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    355

    Re: Error 339 - mswinsck.ocx not correctly registered

    I am having a major issue with this too...

    I tried distributing and NOT distributing... SOME of my users get the error but some don't. In conjunction I am using XML parser (happens to be ver 2.6) which required msxml2.dll Again,, some of my users have no issues whatsoever,, some however can't get the app to work no matter what we do.. I had them register,, unregister,, re-register,,,clean up registry,, install xml parser versions,, and the works,,, I even built fix.bat files to deal with entire winsock file selection,,, and STILL,, on some people'e machines this still happens... baffling!!!

  9. #9
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    355

    Re: Error 339 - mswinsck.ocx not correctly registered

    I am sure in the end it is going to be "ONE OF THOSE" errors that gt fixed with something superbly simple!

  10. #10
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    355

    Re: Error 339 - mswinsck.ocx not correctly registered

    This may be worth exploring for 339 mswinsock.ocx or one of it's dependencies missing or not correctly registered...

    regsvr32 MSWINSCN.OCX

  11. #11
    New Member
    Join Date
    Jul 2009
    Posts
    1

    Re: Error 339 - mswinsck.ocx not correctly registered

    Iv'e been encountering the same problem make sure that your program is set to run in admin mode it fixed it for me

  12. #12
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    355

    Re: Error 339 - mswinsck.ocx not correctly registered

    I got it fixed doing 2 things. I had all my clients register the component as admins and I also had them install the latest version of MSXML parser... which in my case was necessary (not to say that in other cases it would be)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width