Is Self Registeration a Best Method to register a dll in MSI
Created: 03 Apr 2009 | 5 comments
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.
Blog Entry Filed Under:
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments 5 Comments • Jump to latest comment
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.
Cheers'
Vijay
www.msigeek.com
Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com
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.
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.
-Evan
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"
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.
Would you like to reply?
Login or Register to post your comment.