Reply to Thread

Post a reply to the thread: Best practice for removing an installed, registered DLL

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 12-06-2014, 04:20 AM
    linder

    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
  • 12-05-2014, 02:06 AM
    linder

    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
  • 12-04-2014, 01:12 PM
    klmag

    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?
  • 12-04-2014, 11:57 AM
    klmag

    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?
  • 12-04-2014, 11:38 AM
    linder

    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
  • 12-04-2014, 11:35 AM
    linder

    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
  • 12-04-2014, 09:20 AM
    klmag

    Re: Best practice for removing an installed, registered DLL

    I think I went over file size limit. Here:

  • 12-04-2014, 09:14 AM
    klmag

    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.
  • 12-04-2014, 01:13 AM
    linder

    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
  • 12-03-2014, 01:38 PM
    klmag

    Re: Best practice for removing an installed, registered DLL

    That seemed to have worked great.

    What I did notice is that if the reference count in the SharedDll key is >1, and I uninstall the application--remember Register as Shared File and Remove on Uninstall were both checked--the files still get removed from the INSTALLDIR.

    Do I need to uncheck "Remove on Uninstall" and manually check the reference count in the script to see if its safe to delete the files? It would be nice if that automatically happened because adding cases for 120 files would get ugly.
This thread has more than 10 replies. Click here to review the whole thread.

Posting Permissions

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