+Section "File Associations"
+
+ ${DisableX64FSRedirection}
+
+ SetOutPath $INSTDIR
+
+ File "../icon/${WIN_APP_EXE}"
+ File "../icon/${WIN_MPD_EXE}"
+
+ SearchPath $1 "javaw.exe"
+
+ ; application elements
+
+ DeleteRegKey HKCR "${PROG_ID}"
+ DeleteRegKey HKCR "${PROG_ID_MPD}"
+
+ WriteRegStr HKCR "${PROG_ID_MPD}" "" "MicroPeak Data File"
+ WriteRegStr HKCR "${PROG_ID_MPD}" "FriendlyTypeName" "MicroPeak Data File"
+ WriteRegStr HKCR "${PROG_ID_MPD}\CurVer" "" "${PROG_ID_MPD}"
+ WriteRegStr HKCR "${PROG_ID_MPD}\DefaultIcon" "" '"$INSTDIR\${WIN_MPD_EXE}",-101'
+ WriteRegExpandStr HKCR "${PROG_ID_MPD}\shell\play\command" "" '"$1" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"'
+
+ ; .mpd elements
+
+ WriteRegStr HKCR ".mpd" "" "${PROG_ID_MPD}"
+ WriteRegStr HKCR ".mpd" "PerceivedType" "MicroPeak Data File"
+ WriteRegStr HKCR ".mpd" "Content Type" "application/vnd.altusmetrum.micropeak"
+
+ WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID_MPD}" ""
+ WriteRegStr HKCR ".mpd\${PROG_ID_MPD}" "" "${REG_NAME}"
+
+ Call RefreshShellIcons
+SectionEnd
+