How to prevent Windows from caching Com Class info? How to prevent Windows from caching Com Class info? windows windows

How to prevent Windows from caching Com Class info?


I have only been able to solve this problem by...

1: Stopping the Process

2: explicitly unregistering using regsvr32 the library ( or exename /unregserver)

3: Registering the new component

4: Starting the process back up.

I would suspect that it is the Un Reg part that is failing for you. If you are just changing the registry key directly then you should call RegSvr32 /u instead.

Also make sure the new directory location is the current directory when you call RegSvr32.

Note that I have always stopped the process and then unregistered, this is probably a significant detail.


As this is a top result in Google for this narrow-ish problem, I thought it would be valuable to add my troubleshooting outcome for this problem.

I found this response on SO: C# : How to change windows registry and take effect immediately

And linked solution from that answer: Registry Watcher C#

Both of which seem viable options for managing changed keys without forcing a reboot. For us (like the OP) this was when installing updates. For us (possibly unlike the OP) this is infrequent and we decided the effort to implement and test a fix as described was outweighed by the simple solution of requiring a reboot: a process Windows users have come to expect with installing software anyway.