Tuesday 22 March 2011

Regsvr32 in Windows


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.exe is incorporated 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.exe 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.

No comments:

Post a Comment