DllRegisterServer failed with error code 0x80004005

I am getting "DllRegisterServer failed with error code 0x80004005" error while trying to register a dll with command prompt in Vista In this tutorial, I will explain how to remove this error.

1.Go to Start

2.Go to All Programs

3.Go to Accessories

4.Run Command Prompt as Administrator

5.Type regsvr32 to register the DLL.