Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to use the Regsvr32 tool and troubleshoot Regsvr32 error messages


View products that this article applies to.

If this article does not describe the error message that you are receiving, you can obtain detailed error message explanations, recommended actions, and additional support resources from the TechNet Events and Errors page. 

↑ Back to the top


Summary

Regsvr32 is a command-line utility to register and unregister OLE controls, such as DLLs and ActiveX controls in the Windows Registry. Regsvr32.exe is installed in the %systemroot%\System32 folder in Windows XP and later versions of Windows.


Note On a 64-bit version of Windows operating system, there are two versions of the Regsv32.exe file:
  • The 64-bit version is %systemroot%\System32\regsvr32.exe.
  • The 32-bit version is %systemroot%\SysWoW64\regsvr32.exe.

↑ Back to the top


The syntax of the Regsvr32 command

RegSvr32.exe has the following command-line options:
Regsvr32 [/u] [/n] [/i[:cmdline]] <dllname>

/u - Unregister server

/i - Call DllInstall passing it an optional [cmdline]; when it is used with /u, it calls dll uninstall
/n - do not call DllRegisterServer; this option must be used with /i

/s – Silent; display no message boxes

↑ Back to the top


Common solutions for Regsvr32 errors

Try one of the following methods when you receive a Regsvr32 error:
  • Method 1: Re-run the Regsvr32 command from an elevated command prompt

    To open an elevated command prompt, following these steps:
    Windows 8.1 and Windows 8
    Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search. Type Command Prompt in the Search box, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.
    Windows 7 and Windows Vista
    Click Start, type Command Prompt or cmd in the Search box, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.
    Windows XP
    Log on with an administrator account or an account that has administrator permissions, and then open a Command Prompt window.
  • Method 2: Use the 32-bit version of Regsvr32 to register a 32-bit DLL on a 64-bit version of Windows

    If you receive an error when registering a 32-bit DLL on a 64-bit version of Windows, follow these steps:
    1. Open an elevated command prompt.
    2. If the 32-bit DLL is in the %systemroot%\System32 folder, move it to the %systemroot%\SysWoW64 folder.
    3. Run the following command:
      %systemroot%\SysWoW64\regsvr32 <full path of the DLL>

↑ Back to the top


Regsvr32 error messages

Regsvr32 error messages in Windows Vista and later versions of Windows
The following table contains RegSvr32 error messages and possible causes:

Error messageCause
The command-flag ""%1"" is not valid. Please review the command usage and try again.An invalid combination of options was passed in the command line to regsvr32.exe.
This command is only valid if a Microsoft Visual Studio OLE Activex Control project is opened.Regsvr32.exe was invoked by Visual Studio but no modules were specified in the command line.
To register a module, you must provide a binary name.Regsvr32.exe was invoked without specifying any modules in the command line.
The command OleInitialize failed to run. Your computer might be low on memory. Close any open programs and then try again.Regsvr32 must initialize the COM library before it can call needed COM library functions and uninitialize the library when it shuts down. These error messages occur if an attempt to initialize or uninitialize the COM library is unsuccessful.
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.There was an error in loading a module that was specified in the command line. The error text is displayed as part of the message.
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 againRegsvr32.exe was unable to find the required entry point in the module specified in the command line. This can occur if the entry points are not exported correctly from the module or if the module is not a .DLL or .OCX file.
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.There was an error when regsvr32.exe invoked the entry point in the module specified in the command line. The error code is displayed as part of the message.
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.This error can occur, for example, if regsvr32.exe is run on an x86 computer and the module specified in the command line is a 64-bit module.

↑ Back to the top


Keywords: kb, kbwin7swept, kbresolve, kbenv, kberrmsg, kbinfo, kbkern32dll, kbsmbportal

↑ Back to the top

Article Info
Article ID : 249873
Revision : 1
Created on : 1/7/2017
Published on : 5/2/2019
Exists online : False
Views : 748