Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OutOfProcCOM] COMRegistration.LocalServer.Unregister does not fully delete the COM class from registry #5960

Open
forderud opened this issue Jun 30, 2023 · 2 comments

Comments

@forderud
Copy link
Contributor

The ExeServer project in the OutOfProcCOM sample doesn't fully unregister itself when starting with /unregserver. This seem to be caused by the COMRegistration.LocalServer.Unregister function only deleting the content inside the HKCR\CLSID\{class-id} folder, but not the folder itself.

Steps to reproduce:

  • Build OutOfProcCOM solution
  • Run ExeServer.exe /regserver with admin privileges.
  • Run ExeServer.exe /unregserver with admin privileges.
  • Open regedit.exe and observe that there's still a HKCR\CLSID\{AF080472-F173-4D9D-8BE7-435776617347} folder there.
@ElDuderinoBerlin
Copy link

That's correct! You have to change the source code to use DeleteSubKeyTree.

Regards

@forderud
Copy link
Contributor Author

That's correct! You have to change the source code to use DeleteSubKeyTree.

Project maintainers: Is there an interest in receiving a PR for addressing this issue?

forderud pushed a commit to forderud/DotNetSamples that referenced this issue Apr 23, 2024
…CLSID folder

Fixes dotnet#5960 where an empty HKCR\CLSID\{AF080472-F173-4D9D-8BE7-435776617347} folder still remains after unregistration
forderud pushed a commit to forderud/DotNetSamples that referenced this issue Apr 23, 2024
…CLSID folder

WARNING: Doesn't seem to be required.

Fixes dotnet#5960 where an empty HKCR\CLSID\{AF080472-F173-4D9D-8BE7-435776617347} folder still remains after unregistration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants