How to register a DLL file in Windows 7?

Solution 1:

To register a dll, you open a command box as admin and then use regsvr32 /i <dll_name>.

Tha said, your problem seems to be that you just can't copy the file. Again, open a command box as admin and do the following:

  1. ren c:\windows\system32\filename.dll c:\windows\system32\filename.old
  2. copy c:\randomlocation\filename.dll c:\windows\system32\filename.dll

If the file is in use, you should do this in safe mode, command prompt only. If you hose your system, you can delete the dll you copied, and rename the .old back to .dll.

Solution 2:

Here is the full usage of regsvr32.

regsvr32 usage

Solution 3:

Unregister the existing DLL file first (with the /u switch), and then register the DLL. This way, the un-registration routine will clean up the existing settings which often helps when re-registering.

Solution 4:

To register a comm .dll or .ocx on Windows 7 32-bit, do the following:

  1. Copy .dll or .ocx to c:\windows\system32

  2. Type cmd in Run menu, it will search cmd.exe, right click and click Run as Administrator

  3. It will show a prompt at c:\windows\system32

  4. Type regsvr32 ocxname.ocx to register .ocx

    or

    type regsvr32 dllname.dll to register .dll