This wikiHow teaches you how to register a DLL file, which creates a path from the file to the Windows registry. Registering a DLL can fix startup issues for some programs, but most DLL files either don't support registration or are already registered. Keep in mind that you cannot register DLLs that came pre-installed on your Windows computer, as these DLLs are vital to Windows' operation and Windows updates will fix any out-of-date or malfunctioning DLLs.
Registering a DLL File Using Command Prompt
- To register a DLL file on your Windows PC, you can use the regsvr command at the Command Prompt (CMD).
- Open the Command Prompt as an administrator. You'll need admin rights to add the DLL to the registry.
- Use the command regsvr32 <path/to/filename.dll> to register the DLL.
Steps
-
Understand how this method works. You can use a combination of the "regsvr" command and a DLL file's name to register the DLL if the DLL file supports the Register Server export command. This will create a path from the Windows registry to the DLL file, making it easier for Windows processes to find and use the DLL file.
- You'll most commonly need to use this method to register DLLs which came with third-party programs that are supposed to interface directly with system-level resources (e.g., Command Prompt).
-
Know what the "entry point" error means. If the DLL is already registered, it doesn't support the Register Server export command, or its code doesn't allow it to be connected to the Windows registry, you'll receive an error which says, "The module [DLL name] was loaded but the entry point DllRegisterServer was not found". If you see this error message occur, the DLL cannot be registered.
- The "entry point" error isn't so much a problem as it is a confirmation, as seeing this error means that your DLL doesn't need to be registered.
Advertisement -
Find the DLL you want to register. Go to the folder location of the DLL that you want to register. Once you've found the DLL file that you want to register, you can proceed.
- If you installed a program for which you want to register a DLL, for example, you would go to the program's installation folder (e.g., "C:\Program Files\[program name]").
-
Open the DLL's Properties. Right-click the DLL file, then click Properties in the drop-down menu. A pop-up window will open.
-
Note the DLL's name. In the text box at the top of the Properties window, you'll see the DLL's full name. This is the name you'll need to enter later.
- Since most DLLs have difficult-to-remember names, consider leaving up the Properties window when you're done here; that way, you'll be able to copy the name later.
-
Copy the DLL's path. Click and drag your cursor across the string of text to the right of the "Location" heading, then press Ctrl + C to copy the folder path to the DLL.
-
Search for Command Prompt. Type command prompt into the Start search bar. You should see the Command Prompt icon appear at the top of the window.
-
Switch to the DLL's directory. Type in cd and type a space, press Ctrl + V to paste in the path to the DLL file, and press ↵ Enter .
- For example, if your DLL file is in the "SysWOW64" folder that's inside the stock "Windows" folder, your command would look like this:
cd C:\Windows\SysWOW64
- For example, if your DLL file is in the "SysWOW64" folder that's inside the stock "Windows" folder, your command would look like this:
-
Enter the "regsvr" command and the DLL's name. Type in regsvr32 and type a space, then type in your DLL's name (complete with the ".dll" extension) and press ↵ Enter . If your DLL can be registered, doing this will result in a confirmation message.
- For example, if the DLL's name is "usbperf.dll", your command would look like this:
regsvr32 usbperf.dll
- To copy the DLL's name at this point, re-open the folder with the DLL in it (the Properties window should pop up), then highlight the name in the text box and press Ctrl + C . You can then paste the name into Command Prompt by pressing Ctrl + V .
- If the DLL is either already registered or unable to be registered, you'll see the "entry point" error pop up instead of a confirmation message.
- For example, if the DLL's name is "usbperf.dll", your command would look like this:
-
Try unregistering the DLL and then re-registering it. If entering the "regsvr" command results in an error that isn't the "entry point" error, you may need to unregister the DLL before you can actually register it:
- Type in regsvr32 /u name.dll and press ↵ Enter . Make sure to replace "name" with the DLL's name.
- Type in regsvr32 name.dll and press ↵ Enter , again remembering to replace "name" with the DLL's name.
-
Understand how this method works. By creating a list of your computer's DLL files and running the list as a BAT file, you can automatically register all of your computer's DLL files. This is optimal if you don't have a specific DLL that you want to register.
-
Search for Command Prompt. Type command prompt into the Start search bar. You should see the Command Prompt icon appear at the top of the window.
-
Switch to the Windows directory. Type in cd c:\Windows and press ↵ Enter . This will tell Command Prompt to execute the next command inside of the "Windows" folder.
-
Create a DLL list file. Type dir *.dll /s /b > C:\regdll.bat into Command Prompt, then press ↵ Enter . Doing so allows Command Prompt to create a file listing the location and name of every DLL in the Windows directory.
-
Close Command Prompt. Once you see the "c:\Windows>" line of text appear below the command you entered, you're free to exit Command Prompt and proceed.
-
Copy the file onto your desktop. In order to save your changes, you'll need to place a copy of the "regdll" file on your desktop:
- Click the file once to select it.
- Press Ctrl + C .
- Click the desktop.
- Press Ctrl + V .
-
Open the list file in Notepad. Click the file on your desktop once to select it, then do the following:
- Right-click the "regdll" file.
- Click Edit in the drop-down menu.
-
Remove unnecessary DLL locations. While optional, completing this step will cut down significantly on the amount of time it takes to register the DLL files. You can delete any lines of text which have the following locations: [1] X Research source
- C:\Windows\WinSXS — The bottom quarter or so of the text document will contain these lines of text.
- C:\Windows\Temp — You'll find these near the section where the "WinSXS" lines were.
- C:\Windows\$patchcache$ — These are harder to find. You can run a search by pressing Ctrl + F , typing in $patchcache$ , and clicking Find next .
-
Add the "regsvr" command to each line of text. You can do this by using Notepad's "Find and Replace" feature:
- Click Edit .
- Click Replace... in the drop-down menu.
- Type c:\ into the "Find what" text box.
- Type Regsvr32.exe /s c:\ into the "Replace with" text box.
- Click Replace All
- Exit the window.
-
Save your changes and exit Notepad. Press Ctrl + S to save your changes, then click the X in the top-right corner of the Notepad window to close it. At this point, you're ready to run the "regdll.bat" file.
-
Run the file. Right-click the "regdll.bat" file, click Run as administrator , and click Yes when prompted to run it in Command Prompt. Doing so will allow Command Prompt to begin registering every available DLL; this process can take a long time to complete, so just make sure your computer is on and plugged in for the duration.
-
Exit Command Prompt. Once the process finishes running, you can close Command Prompt. Your computer's DLL files should now be registered.
Community Q&A
-
QuestionWhat do I do if the "register" button will not work?War_lizardCommunity AnswerRefresh the page or restart the computer.
Tips
- Unregistering a DLL is helpful if you want to delete it, as every registered DLL is considered "read-only" and thus impossible to delete without unregistering first.Thanks
Warnings
- DLLs are essential for Windows to run properly. While nearly impossible to do, accidentally deleting or changing a system DLL will harm your computer.Thanks
References
About This Article
The easiest way to register a DLL is by updating your Windows computer to the latest version of its operating system. If you want to register DLLs manually instead, you can generate a list of all DLLs on your computer from within Command Prompt, after which point you can open the list in Notepad. After removing unnecessary entries from the list and adding commands before the DLLs you want to register, you can save the Notepad file as a Windows Batch (.bat) file and then execute it by double-clicking it. This will result in all of the selected DLL files on your computer being re-registered.