Regsvr32 in Windows: Explanation, command, usage & error messages

In Microsoft Windows Operating Systems, regsvr32 is a command-line utility used for registering and un-registering OLE controls like DLLs and ActiveX controls in the Windows Registry. For example – a DDL, to be used with regsvr32, must export the functions DllRegisterServer and DllUnregisterServer. This tool may require troubleshooting some problems in Windows, Microsoft Internet Explorer, or other programs.

Regsvr32 in Windows

Regsvr32.exe is included in Microsoft IE 3.0 or later, Windows 95 OSR2 or later and Windows NT 4.0 Service Pack 5. Regsvr32.exe is either installed in System folder of (Windows Me / Windows 98/Windows 95) or System32 (Windows NT/Windows XP/Windows Vista/Windows 7) folder.

Regsvr32 Command and Usage

1. RegSvr32.exe command-line options:

Regsvr32 [/ u] [/ n] [/ i [: cmdline]] dllname

2. Parameters:

  • /u   : It will unregister the file.
  • /s   : Runs regsvr32 silently and does not display any message boxes.
  • /n   : doesn’t call DllRegisterServer. This option should be used with /i.
  • /i :cmdline : It calls DllInstall passing it an optional [cmdline]. When used with /u, it calls dll uninstall.
  • dllname: Specifies the name of the dll file that will be registered.

For example, to manually register and unregister a DLL file shm.dll, we can do the following in CMD:

  • regsvr32 shm.dll for registering a file.
  • regsvr32 /u shm.dll for uninstalling a file.

Regsvr32.exe Error Messages

1. List of error messages caused by Regsvr32.exe in Windows Vista or later

The following list contains RegSvr32 error messages and possible causes:

  1. The command-flag “”%1″” is not valid. Please review the command usage and try again.
  2. This command is only valid if a Microsoft Visual Studio OLE Custom Control project is opened.
  3. To register a module, you must provide a binary name.
  4. The command OleInitialize failed to run. Your computer might be low on memory. Close any open programs and then try again.
  5. The module “”%1″” failed to load.\n\n Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.\n\n%2.
  6. The module “”%1″” was loaded but the entry-point %2 was not found.\n\nMake sure that “”%1″” is a valid DLL or OCX file and then try again.
  7. The module “”%1″” was loaded but the call to %2 failed with error code %3.\n\nFor more information about this problem, search online using the error code as a search term.
  8. The module “”%1″” may not compatible with the version of Windows that you’re running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.

2. List of error messages caused by Regsvr32.exe in OS prior to Windows Vista

The following list contains RegSvr32 error messages and possible causes:

  1. Unrecognized flag: /invalid_flag.
  2. No DLL name specified.
  3. Dllname was loaded, but the DllRegisterServer or DllUnregisterServer entry point was not found.
  4. Dllname is not an executable file and no registration helper is registered for this file type.
  5. Dllname was loaded, but the DllRegisterServer or DllUnregisterServer entry point was not found.
  6. Dllname is not self-registerable or a corrupted version is in memory.
  7. OleInitialize failed (or OleUninitialize failed).
  8. LoadLibrary(“Dllname”) failed. GetlastError returns 0x00000485.
  9. LoadLibrary(“Dllname”) failed. GetLastError returns 0x00000002.
  10. LoadLibrary(“dskmaint.dll”) failed. GetLastError returns 0x000001f.
  11. DllRegisterServer (or DllUnregisterServer)in Dllname failed. Return code was: string.

You can find Regsvr32.exe installed in the System (Windows Me/Windows 98/Windows 95) or System32 (Windows NT/Windows XP/Windows Vista/Windows 7) folder, and on Windows 64-bit version you will find two versions of Regsv32.exe viz. the 64-bit version is in %systemroot%\System32\regsvr32.exe and the 32-bit version is in %systemroot%\SysWoW64\regsvr32.exe explains KB249873.

Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Nitin Agarwal is an MVP alumni and a Pro Blogger. He was awarded as Most Valuable Professional for 3 times by Microsoft in Windows Expert - Consumer category. He is immensely inspired by Bill Gates, Steve Jobs and APJ Abdul Kalam.


  1. Elizabeth@windowserror

    The vast majority of windows errors are caused by corrupted entries in Windows registry. These registry entries are responsible for how windows manages programs that are installed and all information stored on the computer. If the registry fails, so will the windows.

  2. aalia lyon

    click this link and remove rundll error . if you want a best solution then click it and make a proper

    How To Remove Rundll


    Aalia lyon

  3. This is definitely true. However, while this might be the case, the Regsvr32.exe error can be fixed. These are just 2 proven ways [ which this computer error can be solved.

  4. James

    Windows should be smarter by now.
    1) They should mark ALL default Windows reg settings in BLACK,
    with ALL non windows settings (applications, programs, changed user settings) in RED
    2) There should be a right-click/reset system defaults option (recover from malware, etc)
    3) Default Windows directory should be password protected. (Malware cannot infect system areas with read only access, & both malware & windows updates should have to request the password to write to this area. NOTHING should be writable here, without password.)
    4) Windows should reserve a specific area of the HDD/SDD for internet only use, & allow fragmentation of files in these areas, since they are temporary, anyway.
    5) Windows should NOT try to fragment user files, but try to store files complete, only resorting to fragmentation when no there is not space to store files complete (eliminate constant need to defrag)
    6) Windows SHOULD ship with only BARE MINIMAL services, resources, & apps loading that are needed.
    7) Programs should be restricted to a single folder. Uninstallers could be eliminated, because eliminating the folder would eliminate the entire program. Uninstallers are only needed because programs litter the registry with thousands of entries, spread files in program files/common program files/app data/windows dir etc. Limiting apps to ONLY an App area would eliminate having to have an uninstaller & prevent files overwriting each other & causing problems. Wouldnt it be nice if there was just a simple C:AppsInternet Explorer (eliminate internet explorer folder, its completely gone!)

    Reason this does not happen, is they are more concerned with $$$ than making things easier. They could do this, if they wanted. This is also the same reason CD/DVD’s you buy are littered with illegal copy protection schemes. Yes, it is illegal for a company or corporation to sell you something as a “Sale” and then try to maintain ownership of it by claiming you must do this or that because it is really a rental. Dual ownership doesn’t =a sale, it is a rental.

    I know plenty of ways to make things easier.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 7 =