How To Register An Ocx File Manually

Active4 years, 3 months ago

I'm trying to view a surveillance camera system. The remote access is available through a website, and that website seems to need to download a CAB file full of goodies to let me view the cameras.

On some of my systems this install process goes over nicely.

You can use the Microsoft Register Server (Regsvr32.exe) to register a 32- bit.ocx file manually on a 32-bit operating system. You must run regsvr32 as admin. In conflict with the above statement from support.microsoft.com, this works on a 64-bit system as long as the ocx file is in the syswow64 directory. You can use the Microsoft Register Server (Regsvr32.exe) to register a 32- bit.ocx file manually on a 32-bit operating system. In Visual FoxPro 3.0 and 3.0b, Regsvr32.exe is located in the Vfp Samples Ole directory, and in Visual FoxPro 5.0, Regsvr32.exe is located in the Vfp directory. Most likely you are running the 64 bit version of regsvr32 and your OCX is 32 bit. Since regsvr32 loads the OCX DLL into its process, you must use the 32 bit version of regsvr32. That can be found in C: Windows SysWOW64.

To register a dll or ocx Windows System file in a 32-bit version (older) of Windows (Vista, 7, 8.1, or 10), Type cd then press Enter Go to step 5; To register a 32-bit dll or ocx Windows System file in a 64-bit version of Windows (10, 8.1, 7, or Vista), Type cd Windows SysWOW64 then press Enter Go to step 5; To register a dll file in CTI. How to Register OCX Files. OCX files are program file extensions that allow Microsoft Windows operating system users to perform common tasks such as re-sizing open windows or manipulating the placement of scroll-bars.

On a few, particuarly the ones with slower Internet, I get into an endless-loop of: going to the page, waiting a long period of time (I assume this is where its downloading the CAB file), clicking yellow bar to allow it to 'Install this CAB file for all Users' and the page reloading. It never pops up with the Window saying 'Are you sure its cool to Install this stuff?'

Is there a nice way I can side-step this with a little code? I've downloaded the CAB file and extracted its contents. It's full of DLLs and a SetupScript.vbs. I've tried to just let the SetupScript.vbs run, and I've tried to manually register the DLLs with regsrv32. I've even copied the required .OCX and .INF files to the C:WindowsDownloaded Program Files and modified the registry to mimick one where the install went smoothly.

Despite this, when I visit the webpage, it still takes forever and then goes back into the loop described above.

What APIs do I need to call to 'properly' register this component so IE can see it? Or is there something more simple that I'm missing?

Could someone please point me in the right direction to solve this? The browser is IE8, the OS is Vista.

Thanks!

mrduclawmrduclaw
2,6804 gold badges28 silver badges36 bronze badges

2 Answers

In Windows 7 64-bit I copied the OCX files to C:WindowsSysWOW64 and then ran:

The ActiveX plugin worked fine when I launched IE without prompting for an install.

Community
Andrew SAndrew S

Typo from above and i've noticed with some installations of Windows 8.1 you need to run regsvr32 from the sysWOW64 root folder:

kcabramskcabrams

Not the answer you're looking for? Browse other questions tagged windowsinternet-explorer-8activexcab or ask your own question.

Active2 years, 4 months ago

I have tried to use the following code:

But this is not working for me. How can I register a DLL file on Windows 7 with a 64-bit processor?

Peter Mortensen
14.5k19 gold badges89 silver badges118 bronze badges
Rajkumar ReddyRajkumar Reddy
1,1496 gold badges16 silver badges28 bronze badges

15 Answers

Type regsvr32 name.dll into the Command Prompt (executed in elevated mode!) and press 'Enter.' Note that name.dll should be replaced with the name of the DLL that you want to register. For example, if you want to register the iexplore.dll, type regsvr32 iexplore.dll.

LaBracca
5,16229 gold badges114 silver badges207 bronze badges
Harold SOTAHarold SOTA
4,94512 gold badges47 silver badges81 bronze badges

Well, you don't specify if it's a 32 or 64 bit dll and you don't include the error message, but I'll guess that it's the same issue as described in this KB article: Error Message When You Run Regsvr32.exe on 64-Bit Windows

Quote from that article:

This behavior occurs because the Regsvr32.exe file in the System32 folder is a 64-bit version. When you run Regsvr32 to register a DLL, you are using the 64-bit version by default.

Solution from that article:

To resolve this issue, run Regsvr32.exe from the %SystemRoot%Syswow64 folder. For example, type the following commands to register the DLL: cd windowssyswow64regsvr32 c:filename.dll

LiamHow To Register An Ocx File Manually
17.3k16 gold badges80 silver badges135 bronze badges
Hans OlssonHans Olsson
45.7k13 gold badges82 silver badges106 bronze badges

If the DLL is 32 bit:

Copy the DLL to C:WindowsSysWoW64
In an elevated command prompt: %windir%SysWoW64regsvr32.exe %windir%SysWoW64namedll.dll

if the DLL is 64 bit:

Copy the DLL to C:WindowsSystem32
In an elevated command prompt: %windir%System32regsvr32.exe %windir%System32namedll.dll

I know it seems the wrong way round, but that's the way it works. See:

http://support.microsoft.com/kb/249873
Quote: 'Note On a 64-bit version of a Windows operating system, there are two versions of the Regsv32.exe file:
The 64-bit version is %systemroot%System32regsvr32.exe.
The 32-bit version is %systemroot%SysWoW64regsvr32.exe.
'

LiamLiam
1,3581 gold badge9 silver badges13 bronze badges

On a x64 system, system32 is for 64 bit and syswow64 is for 32 bit (not the other way around as stated in another answer). WOW (Windows on Windows) is the 32 bit subsystem that runs under the 64 bit subsystem).

It's a mess in naming terms, and serves only to confuse, but that's the way it is.

Again ...

syswow64 is 32 bit, NOT 64 bit.

system32 is 64 bit, NOT 32 bit.

There is a regsrv32 in each of these directories. One is 64 bit, and the other is 32 bit.It is the same deal with odbcad32 and et al. (If you want to see 32-bit ODBC drivers which won't show up with the default odbcad32 in system32 which is 64-bit.)

Peter Mortensen
14.5k19 gold badges89 silver badges118 bronze badges
phillphill

Open the start menu and type cmd into the search box Hold Ctrl + Shift and press Enter

This runs the Command Prompt in Administrator mode.

Now type: regsvr32 MyComobject.dll

René Höhle
21.4k13 gold badges58 silver badges67 bronze badges
Sushant RathSushant Rath

Finally I found the solution just run CMD as administrator then write

then write this

I hope that answer will help you

fancyPants
41.6k16 gold badges74 silver badges87 bronze badges
Hayder ChebaaneHayder Chebaane

If the DLL is 32 bit:

  1. Copy the DLL to C:WindowsSysWoW64
  2. In elevated cmd: %windir%SysWoW64regsvr32.exe %windir%SysWoW64namedll.dll

if the DLL is 64 bit:

  1. Copy the DLL to C:WindowsSystem32
  2. In elevated cmd: %windir%System32regsvr32.exe %windir%System32namedll.dll
Cairnarvon
17.6k9 gold badges41 silver badges58 bronze badges
DragosDragos

Everything here was failing as wrong path. Then I remembered a trick from the old Win95 days. Open the program folder where the .dll resides, open C:/Windows/System32 scroll down to regsvr32 and drag and drop the dll from the program folder onto rgsrver32. Boom,done.

ohm1ohm1

Knowing the error message would be rather valuable. It is meant to provide info, even though it doesn't make any sense to you it does to us. Being forced to guess, I'd say that the DLL is a 32-bit DirectX filter. In which case this should be the proper course of action:

This must be run at an elevated command prompt so that UAC cannot stop the registry access that's required. Ask more questions about this at superuser.com

Hans PassantHans Passant
815k113 gold badges1399 silver badges2185 bronze badges

I just tested this extremely simple method and it works perfectly--but I use the built-in Administrator account, so I don't have to jump through hoops for elevated privileges.

The following batch file relieves the user of the need to move files in/out of system folders. It also leaves it up to Windows to apply the proper version of Regsvr32.

INSTRUCTIONS:

  • In the folder that contains the library (-.dll or -.ax) file you wish to register, open a new text file and paste in ONE of the routines below :

  • Save your new text file as a batch (-.bat) file; then simply drag-and-drop your -.dll or -.ax file on top of the batch file.

  • If UAC doesn't give you the opportunity to run the batch file as an Administrator, you may need to manually elevate privileges (instructions are for Windows 7):

    1. Right-click on the batch file;
    2. Select Create shortcut;
    3. Right-click on the shortcut;
    4. Select Properties;
    5. Click the Compatibility tab;
    6. Check the box labeled Run this program as administrator;
    7. Drag-and-drop your -.dll or -.ax file on top of the new shortcut instead of the batch file.

That's it. I choseCOPYinstead ofMOVEto prevent the failure of any UAC-related follow-up attempt(s). Successful registration should be followed by deletion of the original library (-.dllor-.ax) file.

Don't worry about copies made to the system folder (C:WindowsSystem32orC:WindowsSysWOW64) by previous passes--they will be overwritten every time you run the batch file.

Unless you ran the wrong batch file, in which case you will probably want to delete the copy made to the wrong system folder (C:WindowsSystem32orC:WindowsSysWOW64) before running the proper batch file, ...or...

  • Help Windows choose the right library file to register by fully-qualifying its directory location.

    1. From the right batch file copy the system folder path
      • If 64-bit: C:WindowsSystem32
      • If 32-bit: C:WindowsSysWOW64
    2. Paste it on the next line so that it precedes %nx1
      • If 64-bit: regsvr32 'C:WindowsSystem32%nx1'
      • If 32-bit: regsvr32 'C:WindowsSysWOW64%nx1'
        • Paste path inside quotation marks
        • Insert backslash to separate %nx1 from system folder path
      • or ...
  • Run this shotgun batch file, which will (in order):

    1. Perform cleanup of aborted registration processes
      • Reverse any registration process completed by your library file;
      • Delete any copies of your library file that have been saved to either system folder;
      • Pause to allow you to terminate the batch file at this point (and run another if you would like).
    2. Attempt 64-Bit Installation on your library file
      • Copy your library file to C:WindowsSystem32;
      • Register your library file as a 64-bit process;
      • Pause to allow you to terminate the batch file at this point.
    3. Undo 64-Bit Installation
      • Reverse any registration of your library file as a 64-bit process;
      • Delete your library file from C:WindowsSystem32;
      • Pause to allow you to terminate the batch file at this point (and run another if you would like).
    4. Attempt 32-Bit Installation on your library file
      • Copy your library file to C:WindowsSystemWOW64
      • Register your library file as a 32-bit process;
      • Pause to allow you to terminate the batch file at this point.
    5. Delete original, unregistered copy of library file
Appreciative UserAppreciative User
Ocx

There is a difference in Windows 7. Logging on as Administrator does not give the same rights as when running a program as Administrator.

Go to Start - All Programs - Accesories.Right click on the Command window and select 'Run as administrator'Now register the dll normally via : regsrvr32 xxx.dll

Werner SpreeuwenbergWerner Spreeuwenberg

And while doing this, if you get error code 0x80040201, try the solution in DllRegisterServer failed with the error code 0x80040201, but make sure, you open command prompt as Run as Administrator.

Peter Mortensen
14.5k19 gold badges89 silver badges118 bronze badges
SHAKIR SHABBIRSHAKIR SHABBIR

You need run the cmd.exe in c:windowssystem32 by administrator

Commands: For unregistration *.dll files

regsvr32.exe /u C:folderfoldername.dll

For registration *.dll files

lailslails

Part of the confusion regarding regsvr32 is that on 64-bit windows the name and path have not changed, but it now registers 64-bit DLLs. The 32-bit regsvr32 exists in SysWOW64, a name that appears to represent 64-bit applications. However the WOW64 in the name refers to Windows on Windows 64, or more explicity Windows 32-bit on Windows 64-bit. When you think of it this way the name makes sense even though it is confusing in this context.

I cannot find my original source on an MSDN blog but it is referenced in this Wikipedia article http://en.wikipedia.org/wiki/WoW64

AdamAdam
9941 gold badge9 silver badges22 bronze badges

Here is how I fixed this issue on a Win7 x64 machine:

'CoCreateInstance() failedPlkease check your registry entriesCLSID{F088EA74-2E87-11D3-B1F3-00C0F03C37D3} and make sure you are logged in as an administrator'

  • Start/type cmd/RightMouseClick on cmd.exe and choose to 'Run as Administrator'
  • typed:regsvr32 /s C:Program FilesAutodesk3ds Max Design 2015atl.dllregsvr32 /s C:Program FilesAutodesk3ds Max Design 2015MAXComponents.dll
  • restart Win 7 and back in business again !

Hope this helps !

LAOMUSIC ARTSLAOMUSIC ARTS
5522 gold badges9 silver badges15 bronze badges

How To Register An Ocx File Manually Windows 10

protected by CommunitySep 10 '14 at 12:02

How To Register An Ocx File Manually Without

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Register Ocx In Windows 10

Not the answer you're looking for? Browse other questions tagged dllwindows-764-bitregsvr32dllregistration or ask your own question.