UnauthorizedException while registering a file association

May 31 at 12:53 PM
Hi,

Thank you for your library. I'm having some trouble trying to run your demo code to register an app.

When I run the code I get an UnauthorizedException even if my app is being run as administrator.

I have no idea why. I'm running Windows 10.
Coordinator
Jun 10 at 6:58 AM
Hi.

Do you have some more information for me?
Do you get the exception within the call to RegisterFileAssociation?
Do you try to register an already existing extension or is this a new extension?
Jun 14 at 1:51 PM
Yes I get the exception within the call to RegisterFileAssociation
I'm trying to set my app as the default app for .txt so yes it's an already existing extension.
Thank you for your reply.