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?
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:
- ren c:\windows\system32\filename.dll c:\windows\system32\filename.old
- 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.
To register a comm .dll or .ocx on Windows 7 32-bit, do the following:
Copy .dll or .ocx to
cmdin Run menu, it will search
cmd.exe, right click and click Run as Administrator
It will show a prompt at
regsvr32 ocxname.ocxto register .ocx
regsvr32 dllname.dllto register .dll
There are usually two issues with regsvr32 on Windows 7:
- 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