Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Bypass windows file assignation reset

i am developing a music player in C# winforms.
My program has code which sets the .mp3 files deafult app to my program.

The code works but everytime it runs, windows resets the app:

screenshot

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

(dont mind the extension in the image i got it from the internet cuz i wasnt able to screenshot it on my pc)

Is there a way to bypass this reset?

>Solution :

Since Windows 10, you cannot change the default application of a file type programmatically. The user is meant to change by himself the default programs from and only from the OS.

You can see the "Important" note in the MS doc : https://learn.microsoft.com/en-US/windows/win32/shell/default-programs?redirectedfrom=MSDN

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading