pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
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)"
}
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
Back
Top