How To Register and Unregister Windows DLL Files with Regsrv32 Command
Dynamic Link Libraries provides helper libraries to the applications. Dynamic Link Libraries also called DLL. DLL’s provides reusable libraries, data and code which can be used by multiple applications or executables. In order to use system wide DLL’s easily we should register them.
regsrv32 is a tool used to register DLL’s to the operating system.
regsrv32 is like below.
regsrv32 OPTIONS DLL
OPTINONSare used provide different actions
DLLis the path with the name of DLL file
Open MS-DOS or Powershell with Administrator Privileges
Playing with DLL’s in windows operating system requires Administrator privileges. So we will register and unregister DLL’s where we need a shell like MS-DOS or Powershell with Administrator privileges. In this example we will open MS_DOS shell with Administrator rights just clicking
Run as administrator menu. The same technique can be used for Powershell too.
Locate and Run Regsrv32 Executable
regsrv32 is not in path environment variables path. It is found following directories.
- For 32 bit Windows
- For 64 bit Windows
We can access just like below for 64 bit Windows.
Now the main operation with
regsrv32 is registering DLL. We do not need any option to specify to register a DLL. We will just provide the DLL name. In this example we register DLL named
cabview.dll which resides in
C:\DLL . Here we assume we have added
%systemroot%\SysWoW64 in to the path variable
> regsrv32 C:\DLL\cabview.dll
We can unregister already registered DLL with
\u option. We will unregister
cabview.dll in the following example.
> regsrv32 \u C:\DLL\cabview.dll
Do Not Display Dialogue Boxes
regsrv32 command outputs as dialog boxes. This may be unnecessary or distracting. We can prevent the dialog box to display with
/s option. This options means silent.
> regsrv32 /s C:\DLL\cabview.dll