+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Best practice for removing an installed, registered DLL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Best practice for removing an installed, registered DLL

    I have DLLs that were installed with version 1.0.0 of my application. I enabled these Installation/Uninstallation Properties:

    Register as Shared File
    Register as OCX/DLL/EXE/TLB
    Remove on Uninstall

    I also have implemented Web Updates. My "Full Installer" installs some required drivers, installs VC++ Redistributable Package. My "Update Installer" doesn't include the larger files that are required to run my application that were installed in the "Full Installer" which is an effort to reduce download size & bandwidth usage from the web.

    Now I want to release version 1.0.1 of my application (both Full and Update). This time around, I removed some of the aforementioned DLLs that aren't needed any longer.

    What is the best way to remove those files completely?

    My idea was: check if the file/DLL exists; if it does, "uninstall" the file. I'm assuming I would have to "undo" the installation properties manually in the script, for each file.

    The idea I personally shot down was uninstall the application, then re-install the update--that would defeat the purpose of a small sized Update Installer.

    My main objective is to have no files (my application requires) remaining on the machine or registry entries in the registry, after running the uninstaller that was installed with the Update Installer.

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

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

    Hello,

    Yes, your idea is correct! Just "undo" the installation properties manually in the script, for each file, during the 1.0.1 installation process.

    Friedrich

  3. #3

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

    Thanks for the response!

    1. How do I properly undo the "Register as Shared File" manually?
    2. To unregister, is it a simple "regsvr32 /s /u [file path]?"
    3. Do I need to check if a file exists before trying to delete it, or is there a silent remove?

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

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

    Hello,

    To handle the Shared File feature in Windows, you have to decrement the counter for you file in the following registry key:

    HKLM\Software\Microsoft\Windows\CurrentVersion\Sha redDlls\c:\yada\yourfile.dll

    You can use the "Get Registry Key Value..." (to read) and the Edit Registry..." (to write) script functions to handle this.

    If the counter is 0 (after decrementation), you have to:

    1. Unregister the OCX file (you can use the "Unregister File Operations" -> "Unregister OCXs/DLLs/EXEs/TLBs file immediately" script function.

    2. Remove the above mentioned key value name (Shared File counter).

    3. Delete the file (using the Delete File(s)...) script function. No need to check if the file exists before trying to delete it.

    Does this help?

    Friedrich

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

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

    BTW, I think we'll add a new "Delete Shared File..." function to the next SetupBuilder update to automate this process.

    Friedrich

  6. #6

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

    Great information!

    I was going to suggest a feature request after I asked the question, which would automate everything because, why not, right?!

    It sounds like it should go pretty smoothly; if not, I'll update the post

    Thanks again!

    Lastly, we have been 100% satisfied with the capabilities of SetupBuilder 8 and the timely, helpful support Lindersoft provides! Keep up the good work!

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

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

    Thank you SO MUCH for you kind words

    If there is any problem (or if you have more suggestions), just let me know. And the new function will definitely be available in the next SB update.

    Friedrich

  8. #8
    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  

  9. #9

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

    I installed my application on x64 Win 8 machine. After the .DLLs (32-bit application) are registered as shared, they show up in:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ Windows\CurrentVersion\SharedDlls

    How should I handle that in the case this could be installed on a x86 or x64; the problem being the Wow6432Node in the key. I assume that wouldn't be there on a x86 machine.

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

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

    Hello,

    You always specify HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Windows\CurrentVersion\SharedDlls and never hard-code the "Wow6432Node" item. Redirection is handled for you behind-the-scenes.

    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
  •