Home > Mobile >  Change extension "type"
Change extension "type"

Time:06-29

I want to change the "type" displayed in file explorer. For example for folders it's "File folder" and for .txt it's "Text Document". I created custom file format, so I want to change it. Is there a way to do that in c#?

CodePudding user response:

Welcome to stack overflow, the file format you want to display from file explorer, you need to make changes your windows registry.

for example, if you want change .mec to display file type as MEC2 Script Engine enter image description here

the following registry changes to be applied (windows 10)

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.mec]
@="MEC2 Script Engine"

basically, you could save the above code as .Reg file and make the necessary changes related to your extension you can import to your registry.

alternatively, you can manually add this entry using Regedit, it is necessary to know that any registry changes will need to apply cautiously. strongly recommend before you make any changes to the system create your restore point when there are any failures.

if you managed to apply your changes successfully you need to reboot your system to take these new registry changes.

  • Related