📎 AI Summary:
The thread discusses whether certain DLLs in a Windows 7 environment need registration and how to identify them. The original poster asks if registering all DLLs with regsvr32 is safe and how to determine which DLLs require registration. A respondent explains that only DLLs with a DLLInstall function need registration and provides a PowerShell script to batch-register DLLs in a folder, suggesting that attempting to register all DLLs generally won't cause harm. Overall, the discussion indicates that registering non-DLLs won't damage the system and provides practical guidance for managing DLL registration.

pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
Thread Author #1
Assume I have (under 64bit Win 7) a big program installation with one main *.exe file and lots of *.dlls.

It seems to me that some but not all of these *.dlls need a registration (by regsvr32) which is done typically at installation time.
Some other *.dlls seem to need NO such registration but are accessed dynamically from the program on-demand.

So are there two such types of *.dlls ?

How do I find out which type of DLL lets say myspecial.dll is?

Now lets say that I got an older installation on an USB flash drive.
I have not the original installation setup package.
In order to make it runnable some of these DLLs must be registered now, afterwards.

Can I just register all of them by simply entering

regsvr32 myspeciallib1.dll
regsvr32 myspeciallib2.dll
...
regsvr32 myspeciallib9.dll

?

Does it hurt if a DLL which is actually not designed for registration is registered anyway?

I am interested only in DLL handling. Other possible issues like missing Registry entries shouldn't be discussed here.

Thank you
Peter
 

Solution
A DLL that has to be registered must have a DLLInstall function in the DLL itself. If this function doesn't exist it wont install, so no it wouldn't hurt anything to try and install all the DLL files.

You could use powershell to try and register all the DLLs in any given folder like so
Make sure to replace the -Path string with the path you need to target.

Code:
$DLLs = Get-ChildItem -Path "C:\Program Files\Common Files\" -Filter "*.dll" -Recurse

foreach ($DLL in $DLLs)
{
    regsvr32 /s "$($DLL.FullName)"
}

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
A DLL that has to be registered must have a DLLInstall function in the DLL itself. If this function doesn't exist it wont install, so no it wouldn't hurt anything to try and install all the DLL files.

You could use powershell to try and register all the DLLs in any given folder like so
Make sure to replace the -Path string with the path you need to target.

Code:
$DLLs = Get-ChildItem -Path "C:\Program Files\Common Files\" -Filter "*.dll" -Recurse

foreach ($DLL in $DLLs)
{
    regsvr32 /s "$($DLL.FullName)"
}
 

Solution