My project generates a dll and when build in Debug mode the dll gets registered automatically by Visual Studio 2005. But when I try to register the same dll in command promp
First, you have to start the Command as a administrator.
Second, you didn't specify your dll file in which directory. If your operating system is 32-bit windows operating system, the regsvr32.exe's default working directory is C:\Windows\System32\.
you may get some help for your answers from here, here