Monday, June 22, 2026

Creating new file types in Windows 10

After formatting my computer and installing Windows 10 IoT LTSC, I lost all my custom file extensions. So far, I was using FileTypesMan, but then I thought, hey what if I actually learn how this file association thing works.

With the help of ChatGPT, I was able to assemble a Registry script to add a new, custom file extension, along with its icon and associated program:

Windows Registry Editor Version 5.00

; Associate extension with given identifier
[HKEY_CLASSES_ROOT\.srt]
@="rodrigocfd.srt"

; File type description
[HKEY_CLASSES_ROOT\rodrigocfd.srt]
@="SRT subtitle"

; Custom icon
[HKEY_CLASSES_ROOT\rodrigocfd.srt\DefaultIcon]
@="D:\\Dropbox\\core\\icons\\srt-blue.ico"

; Open command
[HKEY_CLASSES_ROOT\rodrigocfd.srt\shell\open\command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""

By analyzing the structure above, it’s pretty clear how the structure works.

And now I have the itch to write a program to manage that stuff.

No comments: