Results 1 to 30 of 30

Thread: [RESOLVED] Remove dead COM entries in the registry.

  1. #1

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Resolved [RESOLVED] Remove dead COM entries in the registry.

    I want to ask the VB6 community a question. How do you guys deal with dead COM entries? What I mean is, there might be some times where you register a COM server for a VB6 application which you may later move to a different folder or delete entirely but the COM entries for the classes and interfaces still remain in the registry but they now point to a type library or DLL that no longer exists. I don't know about most people but I tend to do a fresh re-install of Windows every few years so what tends to happen is that this practice pollutes the registry with dead COM data that references all kinds of DLLs and type libraries that no longer exist. I learned to live with it when I was still heavy into VB6 but I never thought to ask until now how others deal with this issue.

    Do you guys know of any tool that can scan the registry and remove invalid COM entries or is it just something we have to live with?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  2. #2
    Frenzied Member
    Join Date
    Dec 2014
    Posts
    1,691

    Re: Remove dead COM entries in the registry.

    why bother?
    a leftover will not do anything until u need it, and when u do, it will tell u that something is not right and u can re-register.

  3. #3
    PowerPoster
    Join Date
    Feb 2017
    Posts
    3,697

    Re: Remove dead COM entries in the registry.

    Before deleting an ocx or com dll, or compiling a new ocx version, I run:

    regsvr32.exe [path\...ocx] /u

    And from time to time run a registry cleaner.
    I use an old version of Advanced SystemCare (version 9).

  4. #4

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by baka View Post
    why bother?
    a leftover will not do anything until u need it, and when u do, it will tell u that something is not right and u can re-register.
    Yes, it does no harm which is why I was able to live with it. However issues can come up if you move things around and delete things and forget to deal with the registry. Plus, I'm a bit OCD. I like things neat and ordered where ever possible. Having a bunch of invalid registry entries harasses my OCD lol. I'm always moving folders around and deleting stuff and sometimes I break VB6 COM applications this way because I registered something is some temp folder somewhere a few years back and forgot about it.

    Quote Originally Posted by Eduardo- View Post
    And from time to time run a registry cleaner.
    I use an old version of Advanced SystemCare (version 9).
    Ah ok. Is that program free?
    Last edited by Niya; Nov 22nd, 2021 at 05:18 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  5. #5
    Frenzied Member
    Join Date
    Dec 2014
    Posts
    1,691

    Re: Remove dead COM entries in the registry.

    I have been thinking about "that", what is the best way to deal with typelibs and such.
    one solution is to put everything in one folder, lets call it C:\VB6\TYPELIBS\ and -"-\OCX\
    that should help with any OCD needs and u will always know where they are.

  6. #6

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by baka View Post
    I have been thinking about "that", what is the best way to deal with typelibs and such.
    one solution is to put everything in one folder, lets call it C:\VB6\TYPELIBS\ and -"-\OCX\
    that should help with any OCD needs and u will always know where they are.
    That's actually a good suggestion and it is something I have practiced in the past. I used to keep all the personal libraries I wrote in one place.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,875

    Re: Remove dead COM entries in the registry.


  8. #8
    PowerPoster
    Join Date
    Feb 2017
    Posts
    3,697

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Niya View Post
    Ah ok. Is that program free?
    Yes.

  9. #9
    Fanatic Member
    Join Date
    Jun 2015
    Posts
    562

    Re: Remove dead COM entries in the registry.

    after installing and configuring a fresh system I take a snapshot of it in its fully configured state with a tool like acronis/macrium etc.

    if windows ever acts up just revert to the fresh snapshot can be done in like 15 minutes and you have a completely clean and configured machine just the way you left it.

    no need to worry about trying to manage all the COM reg entries from uninstalls or recompiles etc

  10. #10
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,804

    Re: Remove dead COM entries in the registry.

    On a "sensitive" machine, after a clean install, setup of apps/programs, and everything runs like it's supposed to do, i do a backup of the disk (!!) with CloneZilla.
    So i get my partition layout, swap etc. back without turning one knob.
    Also nice for quick distribution of an installation.
    Just change the hostname, (and if it applies static IP-Address). Run. Have Fun

    EDIT: For quick distribution i also use the "dd"-command from Unix. two years ago i set up 4 identical machines with that within 30 Minutes total (Manjaro with Cinnamon-Desktop)
    Last edited by Zvoni; Nov 23rd, 2021 at 02:43 AM.
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  11. #11
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,601

    Re: Remove dead COM entries in the registry.

    Here is an internal tool we are using on our build servers. It's pretty shoddy but gets the job done.

    You can use it to review the junk in COM registrations after IDE crashes, double registrations, compilations with Project compatibility even system components have stale registrations after Windows upgrade.

    Just don't use the Delete button unless you know what you're doing or risk screwing your registry beyond recovery. (Btw, never knew how to take backup of the registry so never did one.)

    cheers,
    </wqw>
    Attached Files Attached Files

  12. #12
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,804

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by wqweto View Post
    *snipp*
    (Btw, never knew how to take backup of the registry so never did one.)

    cheers,
    </wqw>
    Huh?
    Open Reg-Editor, right-click on "Computer" (upper left corner in left window, It's the root of the TreeView) --> Export
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  13. #13
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,601

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Zvoni View Post
    Huh?
    Open Reg-Editor, right-click on "Computer" (upper left corner in left window, It's the root of the TreeView) --> Export
    Really?

    This took ages to export here into a 941MB file but how am I supposed to restore my registry with this?

    It will not *remove* bad entries at all and it does not collect permissions so if I merge this back I risk making a huge mess of my registry IMO.

    I always thought you have to use ntbackup.exe for proper backup/restore of user/system registry.

    cheers,
    </wqw>

  14. #14
    Fanatic Member
    Join Date
    Jun 2015
    Posts
    562

    Re: Remove dead COM entries in the registry.

    I wouldn’t dare trying to backup and restore the entire registry like that just select (small) portions. I would imagine some keys are locked from tampering and permission issued and stuff in use or accessed while being written.

    Machine would have be offline and partition accessed with a boot disk or something then just copy the raw hive files but still dicey.

  15. #15
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,601

    Re: Remove dead COM entries in the registry.

    The closest to actual backup/restore comes the built-in REG utility

    Code:
    D:\TEMP>reg save /?
    
    REG SAVE KeyName FileName [/y] [/reg:32 | /reg:64]
    
      KeyName    ROOTKEY\SubKey
        ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
        SubKey   The full name of a registry key under the selected ROOTKEY.
    
      FileName   The name of the disk file to save. If no path is specified, the
                 file is created in the current folder of the calling process.
    
      /y       Force overwriting the existing file without prompt.
    
      /reg:32  Specifies the key should be accessed using the 32-bit registry view.
    
      /reg:64  Specifies the key should be accessed using the 64-bit registry view.
    
    Examples:
    
      REG SAVE HKLM\Software\MyCo\MyApp AppBkUp.hiv
        Saves the hive MyApp to the file AppBkUp.hiv in the current folder
    
    D:\TEMP>reg restore /?
    
    REG RESTORE KeyName FileName [/reg:32 | /reg:64]
    
      KeyName    ROOTKEY\SubKey (local machine only)
        ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
        SubKey   The full name of a registry key to restore the hive file into.
                 Overwrites the existing key's values and subkeys.
    
      FileName   The name of the hive file to restore.
                 You must use REG SAVE to create this file.
    
      /reg:32  Specifies the key should be accessed using the 32-bit registry view.
    
      /reg:64  Specifies the key should be accessed using the 64-bit registry view.
    
    Examples:
    
      REG RESTORE HKLM\Software\Microsoft\ResKit NTRKBkUp.hiv
        Restores the file NTRKBkUp.hiv overwriting the key ResKit
    Unfortunately it cannot backup a hive in use

    Code:
    D:\TEMP>reg save HKLM d:\temp\backup-hklm.hiv
    ERROR: Access is denied.
    So even in 2021 easiest is to use 3-rd party utilities to backup registry while the OS is running (using VSS) like this one: RegBak

    cheers,
    </wqw>

  16. #16
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,804

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by wqweto View Post
    Really?

    This took ages to export here into a 941MB file but how am I supposed to restore my registry with this?

    It will not *remove* bad entries at all and it does not collect permissions so if I merge this back I risk making a huge mess of my registry IMO.

    I always thought you have to use ntbackup.exe for proper backup/restore of user/system registry.

    cheers,
    </wqw>

    Well, your question was how to backup. Restore wasn't part of the question
    Another way: Copy/Backup the Files directly --> https://www.thewindowsclub.com/where...d-in-windows-7
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  17. #17
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,601

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Zvoni View Post
    Another way: Copy/Backup the Files directly
    Yes, this seems the way to go.

    Actually registry is stored in a JET database (several MDB files) but unfortunately you cannot reliably copy these while the database is in use (while the OS is running).

    You have to either boot in Recovery Console to copy the contents of C:\Windows\System32\Config folder to a backup folder while files are not in use or use Volume Shadow Copy to snapshot a consistent state of the database while the OS is running.

    cheers,
    </wqw>

  18. #18

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Arnoutdv View Post
    I gave this a try and while it can find invalid COM entries, it cannot remove them. It just fails with errors. I tried to figure out why but I eventually gave up.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  19. #19

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by wqweto View Post
    Here is an internal tool we are using on our build servers. It's pretty shoddy but gets the job done.

    You can use it to review the junk in COM registrations after IDE crashes, double registrations, compilations with Project compatibility even system components have stale registrations after Windows upgrade.

    Just don't use the Delete button unless you know what you're doing or risk screwing your registry beyond recovery. (Btw, never knew how to take backup of the registry so never did one.)

    cheers,
    </wqw>
    This is a neat little program. However, I can't seem to delete invalid entries using this either. I assumed that when I clicked the Invalid i/s button it would show me a list of invalid entries but it didn't. As far as I can tell it has no effect. Interesting little program though.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  20. #20

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by dz32 View Post
    after installing and configuring a fresh system I take a snapshot of it in its fully configured state with a tool like acronis/macrium etc.

    if windows ever acts up just revert to the fresh snapshot can be done in like 15 minutes and you have a completely clean and configured machine just the way you left it.

    no need to worry about trying to manage all the COM reg entries from uninstalls or recompiles etc
    Macruim makes extremely top notch software. I'm familiar with Reflect.

    Also, what about Windows restore points? Couldn't this work for restoring Windows to a previously stable point?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  21. #21

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Eduardo- View Post
    Yes.
    I also gave this a try, although I installed version 15 instead of 9. This also didn't work. It has a whole bunch of features I didn't want and it also put a bunch of annoying popups and widgets on my computer. To top it off the registry cleaner looked like it worked, yet after it said everything was cleaned out, the dead entries were still present after. I got scammer vibes from this software. It reminds me of software you used to find on old Warez sites that promise to boost your PC's speed by insane percentages but really they were just platforms for adware.

    I'm not saying this one is such a thing because obviously you wouldn't recommend it if it didn't work for you. That's just the vibe I got.

    Anyways, I think the old adage applies here, "when you want something done right, do it yourself". At some later date I think I'll study the cleaner code wqweto posted and write something similar in .Net.

    Thanks everyone for your responses. I'm marking this resolved now.
    Last edited by Niya; Nov 24th, 2021 at 06:48 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  22. #22
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    7,259

    Re: [RESOLVED] Remove dead COM entries in the registry.

    Personally, unless I think I'm having some kind of performance issue, I don't mess with it ... and I'm scared to death of those registry "cleaner" utilities.

    I can easily see a situation where those "cleaners" don't know exactly what they're doing and delete something that's important, possibly breaking something that will possibly cause you many hours of agony to get sorted.


    This takes me back to my very long ago DOS days. On my IBM-XT, I remember being insistent upon knowing what every single file on my computer was doing. (Didn't have a registry to worry about.) When Windows 3.1 came along, I was still of that mindset, and still had a pretty good handle on it. However, probably around Win95 or maybe Win98, I realized that this was just no longer a possibility, and eventually let go of it. I'm pretty much the same way about the registry ... there's all kinds of crap in there about which I have no clue, but that's just the world we live in.

    And then, we can push forward to the dawn of quantum computers, where not even the original programmers know what everything is doing.

    Ohhh, I recently heard a nice joke (probably old, but I just heard it).

    Guy walks into a bookstore and asks for a book on Pavlov and Schrödinger. Owner says, "it rings a bell but I'm not sure if it's here or not".
    Last edited by Elroy; Nov 24th, 2021 at 07:19 PM.
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  23. #23

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: [RESOLVED] Remove dead COM entries in the registry.

    Quote Originally Posted by Elroy View Post
    Personally, unless I think I'm having some kind of performance issue, I don't mess with it ... and I'm scared to death of those registry "cleaner" utilities.

    I can easily see a situation where those "cleaners" don't know exactly what they're doing and delete something that's important, possibly breaking something that will possibly cause you many hours of agony to get sorted.
    Yea. This is always a scary possibility. But I'm not opposed to nuking my system in the pursuit of knowledge as long as actual files don't get deleted. I don't mind doing complete re-installs. There were times in my past where I did multiple re-installs in a single night trying to fix one issue or another.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  24. #24
    Fanatic Member
    Join Date
    Jun 2015
    Posts
    562

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Niya View Post

    Also, what about Windows restore points? Couldn't this work for restoring Windows to a previously stable point?
    I always turn off windows restore points I hate them. They are slow and seem to slow down system performance and I just don’t trust them. Also malware frequently wipes them.

  25. #25

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by dz32 View Post
    I always turn off windows restore points I hate them. They are slow and seem to slow down system performance and I just don’t trust them. Also malware frequently wipes them.
    Ah ok. I've never used it but I've always wanted to try it. I didn't know it was this problematic.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  26. #26
    PowerPoster
    Join Date
    Feb 2017
    Posts
    3,697

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by dz32 View Post
    I always turn off windows restore points I hate them. They are slow and seem to slow down system performance and I just don’t trust them. Also malware frequently wipes them.
    I find them very useful, any time that I'm going to do something that I'm not sure if I will be able to undo, I make a restore point.

    It allowed me to go back to a good Windows state many times.

    I don't think that would impact in any Windows performance out of that time when do are making a new restore point (it takes seconds, BTW). Anyway they take some disk space, not a lot but some (of course).

    PS: the problem with restore points that I see is that they are limited in time, Windows automatically deletes them after a couple of weeks (or so).

  27. #27
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,601

    Re: Remove dead COM entries in the registry.

    Quote Originally Posted by Niya View Post
    I assumed that when I clicked the Invalid i/s button it would show me a list of invalid entries but it didn't.
    The UI is abhorent. You first have to Scan your current registry (into an MDB). Then you can filter typelibs/CLSIDs by C:\Work\MyProject folder (or project name) and delete these (with Invert + Delete).

    Invalid interfaces (a SQL query) lists interfaces from missing typelibs (which you can Invert + Delete too). Usually you get a lot of temp VB6 entries left from crashed debug sessions.

    At least you can explore the state of the three main registry keys containing local COM registrations.

    The unfortunate state of affairs is that regtlib.exe (and VB6 IDE) *cannot* unregister typelibs. There is no /u switch (like in regsvr32.exe) because there is no API call for unregistration.

    cheers,
    </wqw>

  28. #28
    Frenzied Member
    Join Date
    Dec 2014
    Posts
    1,691

    Re: [RESOLVED] Remove dead COM entries in the registry.

    I did use cleaners in "xp" days.
    after installing windows7 many years ago it still work great, no strange performance issues or annoying popup telling me this and that.
    I think the reason is:
    - I use SSD, they give you less headaches than HDD.
    - I don't install tons of crap softwares all the time. I have what I need and seldom need something new and if so, Im more careful with what I install.
    - I don't use OCX for my project, so no need to do any installations.

    I think, if you need registry cleaners you are not doing a good job with your windows.
    as I wrote before, if you are creating your own OCX/Typelibs or using a OCX/Typelib from someone else, create a folder where u will have all those.
    don't just download, put in some random folder, install, forget, delete folder (without unregister first) and theres a entry in the registry (a leftover)

    also, the registry is like a library. you don't need to remove a book you are not using, or if the book is gone for some reason, you can "get it again" or simply let the register of that book just be, it will not do much.
    if you instead have messed up and a tool is not working properly. well. re-install.

    I would avoid cleaners. they don't know 100% if you are using something or not.
    I remember that in XP, they didnt help much those registry cleaners, and eventually the only solution was to install a new OS anyway.

  29. #29
    PowerPoster
    Join Date
    Feb 2017
    Posts
    3,697

    Re: [RESOLVED] Remove dead COM entries in the registry.

    Quote Originally Posted by baka View Post
    - I don't use OCX for my project, so no need to do any installations.
    That's the only reason.

    Quote Originally Posted by baka View Post
    I think, if you need registry cleaners you are not doing a good job with your windows.
    So wrong...

    Quote Originally Posted by baka View Post
    I would avoid cleaners. they don't know 100% if you are using something or not.
    You don't know what you are talking if you don't use OCXs.
    And there is no problem, you can register the files again at any time.

    In Windows 10, having registered different OCX/DLL versions of the same component is much more problematic that it was in previous Windows versions.

    PS: even regsvr32.exe /u does not clean everything.

  30. #30

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    7,043

    Re: [RESOLVED] Remove dead COM entries in the registry.

    Quote Originally Posted by wqweto View Post
    The UI is abhorent. You first have to Scan your current registry (into an MDB). Then you can filter typelibs/CLSIDs by C:\Work\MyProject folder (or project name) and delete these (with Invert + Delete).

    Invalid interfaces (a SQL query) lists interfaces from missing typelibs (which you can Invert + Delete too). Usually you get a lot of temp VB6 entries left from crashed debug sessions.

    At least you can explore the state of the three main registry keys containing local COM registrations.

    The unfortunate state of affairs is that regtlib.exe (and VB6 IDE) *cannot* unregister typelibs. There is no /u switch (like in regsvr32.exe) because there is no API call for unregistration.

    cheers,
    </wqw>
    Ah ok. Sounds like you guys put this together in a hurry. Might be an interesting project to do a fully functional version with everything working proper and easy to use.

    Quote Originally Posted by baka View Post
    I think, if you need registry cleaners you are not doing a good job with your windows.
    Nah. That's not it, at least not for me. I don't install a bunch of garbage on my computer. I'm strict about that. Thing is though, my PC goes years without fresh re-installs so what tends to happen over time is I end up with a lot of rubbish in the registry, especially when I install, write or test various VB6 programs over the years. I often end up deleting folder or moving stuff where COM DLLs/OCXs are registered. I just think it would be nice when I'm writing any VB6 code that involves adding references for invalid references to not show up. It's not a huge deal but I do find it annoying sometimes when adding a typelib to a project, that the IDE complains that the file doesn't exist and then I have to re-register it in a new location. Sometimes I might want to use a new version of whatever and I want the old one gone.

    All in all, it's a minor annoyance that I've learned to live with. But like I said, I tend to want things nice and neat whenever I think it could be helped.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

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



Click Here to Expand Forum to Full Width