Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registers the .mlt file name extension and associate it with shotcut.exe #1237

Merged
merged 2 commits into from Mar 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions packaging/windows/shotcut.nsi
Expand Up @@ -101,6 +101,15 @@ Section "Create Start Menu Shortcut"

SectionEnd

; Optional section (can be disabled by the user)
Section "Associate *.mlt files with Shotcut"

;register file extensions
WriteRegStr HKCR ".mlt" "" "Shotcut.mlt"
WriteRegStr HKCR "Shotcut.mlt\shell\open\command" "" "$\"$INSTDIR\shotcut.exe$\" $\"%1$\""

SectionEnd

; Opt in section (can be enabled by the user)
Section /o "Create Desktop Shortcut (Icon)"

Expand Down Expand Up @@ -132,6 +141,8 @@ Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Shotcut"
DeleteRegKey HKLM SOFTWARE\Shotcut
DeleteRegKey HKCR ".mlt"
DeleteRegKey HKCR "Shotcut.mlt"

; Remove shortcuts, if any
SetShellVarContext all
Expand Down