+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Best practice for removing an installed, registered DLL

  1. #11
    Join Date
    Mar 2004
    Posts
    4,307

    Default 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
    Attached Images Attached Images      

  2. #12

    Default 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.
    Attached Images Attached Images  

  3. #13

    Default Re: Best practice for removing an installed, registered DLL

    I think I went over file size limit. Here:


  4. #14
    Join Date
    Mar 2004
    Posts
    4,307

    Default 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

  5. #15
    Join Date
    Mar 2004
    Posts
    4,307

    Default 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

  6. #16

    Default 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?

  7. #17

    Default 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?

  8. #18
    Join Date
    Mar 2004
    Posts
    4,307

    Default 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

  9. #19
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Best practice for removing an installed, registered DLL

    Quote Originally Posted by klmag View Post
    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
    Attached Images Attached Images  

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •