Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Management Community Blog

Is Self Registeration a Best Method to register a dll in MSI

Created: 03 Apr 2009 • 5 comments
WiseUser's picture
+2 2 Votes
Login to vote

Best way to register a dll which is part of the package is ,

Go to Files section in Wise Package Studio

Select the dll  -> Double click the dll - > go to self registeration ->

Select the Registration method -> Use order specified below...

These steps will result in auotomatic self registration in the package using

Msiexec.exe /y & /z for registeration \ unregister the dll.

Comments 5 CommentsJump to latest comment

R-Vijay's picture

SelfRegister is not a good option always. One of the reason being that, Reference counts will not  be maintained, hence shared dll's may have a problem. Also, we will not have a customizable path for the registering.


Microsoft MVP [Setup-Deploy]

Login to vote
rbrucelee1978's picture

I would be more inclined to recommend registering the dll using wisecomcapture and importing the extracted data into the corresponding component. Doing it this way ensures that correct advertising tables are populated.

Login to vote's picture

Seriously never use self registration in an .msi.  There's no legit reason to do it.  And be careful with WiseComCapture, it seems to be limited to 64kb .reg files...truncates the rest.  I always use SetupCapture to capture the registration of files (if you need to manually register, just use regsvr32.exe while between snapshots).  And don't use the Typelib table, store that info in the registry table.


Login to vote
John McFadyen's picture

Hi Evan,

I am curious to understand why you say not to use the typelib table in the advertising tables. Can you elaborate as to why ? 

On another note, you can also import the com by registering the dll on the machine and then using the import COM for a respective component using "rescan advertising"

Login to vote
AngelD's picture

Could it be that the information was taken directly from the list of Windows Installer Best Practices?

Do not use the SelfReg and TypeLib tables.
Installation package authors are strongly advised against using the TypeLib table. Instead of using the TypeLib table, register type libraries by using Registry table. If an installation using the TypeLib table fails and must be rolled back, the rollback may not restore the computer to the same state that existed prior to the rollback.

Best Practises may not always be a best practise
I can't say that I've ever had the "rollback" problem described above when using the TypeLib table.

Login to vote