This article shows how to register a DLL in Windows. This operation is to insert the path of the DLL file into the registry. Registering a DLL is useful for solving problems related to the startup phase of programs or applications. However, it should be noted that most of the DLLs will already be registered in the system or do not require this operation. Remember that it is not possible to register a DLL that is an integral part of Windows, as these files are crucial for the functioning of the Microsoft operating system. Furthermore, the updates that are released for Windows are used to solve all problems related to malfunctioning DLLs or to be replaced with more updated versions.
Steps
Method 1 of 2: Register a Single DLL
Step 1. Understand how this method works
To register a DLL in Windows (if the latter supports the registration operation) you need to use the "regsvr" command and know the complete path of its file. This will create a correlation between the Windows registry and the DLL file so that the operating system can find it and use it when needed.
Most likely you will need to use this method to register DLLs related to third party programs that will have to communicate directly with the operating system or use related resources (for example the "Command Prompt")
Step 2. Understand the meaning of the "entry point" error message
If the DLL in question is already registered within the system, a new registration cannot be performed using the "Register Server Export" command or if the relative code does not allow registration in the "System Registry" Windows by registering you will receive the following error message "The module [DLL_name] was loaded but the entry point [parameter] was not found". In this case it means that the DLL in question cannot be registered.
This type of error related to the DLL "entry point" is not really a problem, but more simply the confirmation that the file in question does not need to be registered or more simply that it has already been registered
Step 3. Locate the DLL you want to register
Navigate to the folder that contains the DLL file to register. Once you have this information you can continue.
For example, if you have installed a specific program that needs the DLL in order to function properly, you will need to access its installation folder to locate the file to register (for example "C: / Program Files [program_name]")
Step 4. View the properties of the DLL file
Select it with the right mouse button and choose the option Property from the context menu that will appear. A new dialog box relating to the properties of the chosen file will appear.
Step 5. Note the name of the DLL
The full name of the DLL file is displayed in the text field at the top of the "Properties" window. You will need this information later, so make a note of it.
Since most DLLs have little mnemonic and very complex names, it may be useful to keep the "Properties" window of the DLL file open until registration is complete. This way you will be able to copy the name when you need it without having to type it manually
Step 6. Copy the full path of the DLL
Place the mouse cursor at the beginning of the text string on the right of the "Path" entry, drag it to the end of the text, then press the key combination Ctrl + C to copy the path of the folder where the DLL is stored.
Step 7. Access the "Start" menu by clicking the icon
It features the Windows logo and is located in the lower left corner of the desktop.
Step 8. Search for the "Command Prompt" system program
Type the keywords command prompt into the "Start" menu that appears. The "Command Prompt" icon should appear at the top of the menu.
Step 9. Start the "Command Prompt" in "administrator" mode
Follow these simple instructions:
-
Select the "Command Prompt" icon
with the right mouse button;
- Choose the option Run as administrator from the context menu that appeared;
- Push the button Yup when required.
Step 10. Navigate to the folder where the DLL file to register is located
Type the command cd, add a blank space, then press the key combination Ctrl + V. The full path of the DLL file will be displayed in the "Command Prompt" where the text cursor is located. At this point, press the Enter key.
-
For example, if you need to register the DLL stored inside the "SysWOW64" folder which is nested inside the "Windows" folder, the newly created command should look like this:
cd C: / Windows / SysWOW64
Step 11. Use the "regsvr" command followed by the name of the DLL to register
Type the regsvr32 command, add a blank space and enter the name of the DLL (remember to also add the ".dll" extension at the end of the file name), then press the Enter key. If the DLL under consideration supports registration in the Windows "registry", you will see a confirmation message.
-
For example, if the name of the DLL to register is "usbperf.dll", the complete command will look like this:
regsvr32 usbperf.dll
- To copy the name of the DLL, access the folder where the relative file is stored again (the "Properties" window you left open should automatically appear), select the name in the text field at the top of the "Properties" window and press the key combination Ctrl + C. At this point you can paste the copied information directly into the "Command Prompt" by simply pressing the key combination Ctrl + V.
- If the DLL in question is already registered or does not need to be registered, you will see the error message "The module [name_DLL] has been loaded but the entry point [parameter] was not found" instead of the one confirming registration..
Step 12. Try unregistering the DLL and making a new one
If you received an error message when running the "regsvr" command, you may need to unregister the DLL before you can register it again. Follow these simple instructions:
- Type the command regsvr32 / u [name_DLL.dll] and press the Enter key. Make sure to replace the parameter [DLL_name] with the name of the DLL to process;
- Type the command regsvr32 [name_DLL.dll] and press the Enter key. Also in this case remember to replace the parameter [name_DLL.dll] with the name of the DLL to be processed.
Method 2 of 2: Re-register All DLLs
Step 1. Understand how this method works
By creating a BAT file containing the complete list of all system DLLs you will be able to automatically register them. This method is ideal when you need to register a large number of DLLs at the same time.
Step 2. Access the "Start" menu by clicking the icon
It features the Windows logo and is located in the lower left corner of the desktop.
Step 3. Search for the "Command Prompt" system program
Type the keywords command prompt into the "Start" menu that appears. The "Command Prompt" icon should appear at the top of the menu.
Step 4. Start the "Command Prompt" in "administrator" mode
Follow these simple instructions:
-
Select the "Command Prompt" icon
with the right mouse button;
- Choose the option Run as administrator from the context menu that appeared;
- Push the button Yup when required.
Step 5. Go to the "Windows" folder
Type the command cd c: / Windows and press the Enter key. In this way, all the commands you execute from now on will have the context of the system "Windows" folder.
Step 6. Create the list of DLLs to register
Type the command dir *.dll / s / b> C: / regdll.bat inside the "Command Prompt" window and press the Enter key. In this way, the "regdll.bat" file will be created automatically, in which all the DLLs present in the "Windows" folder and their complete path will be listed.
Step 7. Close the "Command Prompt" window
When the "c: / Windows>" text line reappears after executing the previous command, you will be able to close the "Command Prompt" window.
Step 8. Navigate to the folder where the BAT file was saved with the list of DLLs to register
Use the "File Explorer" window to locate the file in question:
-
Open a window File Explorer clicking the icon
or by pressing the key combination ⊞ Win + E;
- Choose the option This PC listed inside the left sidebar of the window;
- Double-click the computer's main hard drive icon labeled OS (C:) (or [manufacturer_name] (C:));
- If necessary, scroll down the list until you find the "regdll.bat" file.
Step 9. Copy the file directly to your desktop
In order to make changes to the "regdll.bat" file you will need to create a copy directly on your computer desktop:
- Select the file with a single mouse click;
- Press the key combination Ctrl + C;
- Select an empty spot on the desktop;
- Press the key combination Ctrl + V.
Step 10. Start the "Notepad" program and use it to open the "regdll.bat" file
Select the file in question with a single mouse click and follow these instructions:
- Select the "regdll.bat" file with the right mouse button;
- Choose the option Edit from the context menu that appeared.
Step 11. Delete all unnecessary DLLs from the list
While this step is not mandatory, it does significantly reduce the time required to perform the registration of DLL files. Delete from the list all the elements stored in the following paths:
- C: / Windows / WinSXS - the bottom of the list will contain lines of code that refer to this path;
- C: / Windows / Temp - these lines of text are located near the section relating to DLLs in the "WinSXS" folder that you have previously deleted;
- C: / Windows / $ patchcache $ - these lines of text are hard to spot. To fix this, perform a targeted search by pressing the key combination Ctrl + F, then type the search string $ patchcache $ and press the button Find next.
Step 12. Add the "regsvr" command to each line of text in the file
You can automate the process using the "Replace" feature of the "Notepad" program:
- Access the menu Edit of the program;
- Choose the option Replace …;
- Type the search string c: / in the "Find:" field;
- Enter the code Regsvr32.exe / s c: / in the "Replace with:" field;
- Push the button Replace everything;
- At this point, close the "Replace" dialog box.
Step 13. Save your changes and close the "Notepad" program window
Press the key combination Ctrl + S to save all changes made to the file, then close the program window by clicking the icon in the shape of X located in the upper right corner. Now the "regdll.bat" file is ready to run.
Step 14. Auto-register DLLs
Select the "regdll.bat" file with the right mouse button and choose the option Run as administrator. Push the button Yup when prompted to run the file within the "Command Prompt". All DLLs in the file will be registered automatically. This step may take some time to complete, so make sure your computer is up and running.
Step 15. Close the "Command Prompt"
Once the "regdll.bat" file has finished running, you can close the "Command Prompt" window. At this point, all system DLLs should be registered correctly.