I copied a dll to the system32 directory. I want to register it, which requires me to be Administrator. If I right click on cmd.exe and run as Administrator and list the directory, the dll isn't shown. However, if I start cmd.exe normally, I can see the file, but can't register it.
You can't write to
system32 (or anything under
%SystemRoot%) as a regular user. This means that you did not actually copy your library there.
I recall something about Windows 7 having some kind of a "filesystem virtualization" -- if you copy a file to a system directory but you don't have enough rights, it will appear to work, but the file will instead be copied to
%UserProfile% usually is
C:\Users\<username>\). Check out that directory. If you find the DLL inside, delete it, then copy it as an Administrator.