Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hey I tried adding a DLL file in Windows 7 by copying to system32 folder, but I couldn't as Access Was Denied. Actually there is an existing DLL file and I'm trying to replace it. How can I do this in Windows 7?

share|improve this question
    
Are you copying it in as an Admin? Are you trying to replace a known Windows System file? Have you looked into using regsvr32 to register the DLL? –  Ƭᴇcʜιᴇ007 Jun 16 '11 at 16:20

7 Answers 7

the regsvr32 located in SysWow64 folder is for 32bit dll

It's a strange naming from microsoft: WOW64 means "windows [32bit] on windows 64bit" the one located in system32 is for 64bit dlls.

share|improve this answer

If your Windows 7 is x64 and the DLL you want to register is x64 you may run regsvr32.exe from C:\Windows\SysWOW64.

Example:

C:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\StrmExt_x64.dll
share|improve this answer

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

share|improve this answer

There are usually two issues with regsvr32 on Windows 7:

  1. UAC
  2. The fact that you may have a 64 Bit OS and the file dll you need to register is a 32 Bit one.

To get around the "Access Denied" problem, start the command line as admin, in the start menu type 'cmd.exe' and then right click the 'cmd.exe' entry and 'Run as Administrator'.

If the DLL is 32bit and in the 32Bit Windows directory, use the 32bit version of regsvr32 at c:\windows\sysWOW64\regsvr32.exe

share|improve this answer

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.

share|improve this answer
1  
Gentle reminder: Look out for Windows File Protection - support.microsoft.com/kb/222193 :) –  Ƭᴇcʜιᴇ007 Jun 16 '11 at 16:30

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.

share|improve this answer
    
That’s a good answer in regards to registering a DLL, but the question is about copying the file to System32. –  Synetech May 5 '12 at 0:15

Here is the full usage of regsvr32.

regsvr32 usage

share|improve this answer
    
This won't help with the "Access Denied" Johnes is getting, –  Ben Voigt May 5 '12 at 0:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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