5 Attachment(s)
Re: Best practice for removing an installed, registered DLL
Hello,
Please see attached screenshots (Windows 10 Enterprise Edition x64, latest TP build). Two projects make use of the same shared DLL. After running both setups, the shared counter for the file SBKERNEL.DLL is "2". After uninstalling one project, the shared counter is "1" and the file is still there. If it is "0" then the uninstaller removes the registry key and the file.
Does this help?
Friedrich
1 Attachment(s)
Re: Best practice for removing an installed, registered DLL
I must be doing something wrong. Please see attachment.
I am installing my COM dlls in %COMMONFILESIDIR%\MyCompany\Location\.
When I "regsvr32 -u" manually the count decrements by one, so its not happening inside COM code itself.
Re: Best practice for removing an installed, registered DLL
I think I went over file size limit. Here:
http://i.imgur.com/bfdWfA9.jpg
Re: Best practice for removing an installed, registered DLL
Hello,
I am afraid I don't understand, sorry :( What does "regsvr32 -u" have to do with the SharedDll counter and with the deleted file(s)?
Friedrich
Re: Best practice for removing an installed, registered DLL
BTW, an installer does not use "regsvr32 -u" because it calls the Windows API directly (Register as OCX checkbox).
Friedrich
Re: Best practice for removing an installed, registered DLL
Sorry for the confusion.
I thought calling regsvr32 -u decrements the reference count but I just found out it doesn't!
Either way, my files are still being deleted on uninstall even went reference count > 1. Would you like me to send installers? Do you need .sb8 files also?
Re: Best practice for removing an installed, registered DLL
I figured it out! Because v2 (update from v1) marked the file as shared DLL as well as in v1, the count was incremented to 2. If I manually increment the count to 3, and uninstall the application, the entry is then only 1. Awesome, SB8 keeps track of the amount of times the number is incremented!
Will changing the upgrade GUID or anything cause the uninstaller to lose this reference count?
Re: Best practice for removing an installed, registered DLL
Perfect, thank you for the update! :)
No, you can change the GUID and the uninstaller will NOT lose this reference count.
Friedrich
1 Attachment(s)
Re: Best practice for removing an installed, registered DLL
Quote:
Originally Posted by
klmag
I was going to suggest a feature request after I asked the question, which would automate everything because, why not, right?!
New function added to the internal SetupBuilder version. It will handle it automatically. This will be available in the next update.
Thanks again for your suggestion.
Friedrich