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.

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

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 0×00000485.
  9. LoadLibrary(“Dllname”) failed. GetLastError returns 0×00000002.
  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.

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.
  • http://thewindowsregistry.com 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.

  • aalia lyon

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

    How To Remove Rundll
    Error

    Thanks

    Aalia lyon

  • http://errortools.com/ sammeh

    This is definitely true. However, while this might be the case, the Regsvr32.exe error can be fixed. These are just 2 proven ways [ http://errortools.com/windows/fix-regsvr32-error/in which this computer error can be solved.

  • Recent Comments