Fix p7m and p7s file extensions for Windows 7
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 18 Jul 2018 13:21:09 +0000 (15:21 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 18 Jul 2018 13:21:09 +0000 (15:21 +0200)
* src/inst-kleopatra.nsi, src/uninst-kleopatra.nsi: Register
for P7MFile and P7SFile.

--
On windows 7 those two are used instead of .p7m and .p7s

GnuPG-Bug-Id: T3890

src/inst-kleopatra.nsi
src/uninst-kleopatra.nsi

index 7cb2500..75cd7ef 100644 (file)
@@ -275,6 +275,13 @@ ${MementoSection} "Kleopatra" SEC_kleopatra
   WriteRegStr SHCTX "Software\Classes\openpgp4fpr\DefaultIcon" "" "$INSTDIR\bin\kleopatra.exe,0"
   WriteRegStr SHCTX "Software\Classes\openpgp4fpr\shell\open\command" "" "$\"$INSTDIR\bin\kleopatra.exe$\" --query $\"%1$\""
 
+  # p7s / p7m are special because they are already known
+  WriteRegExpandStr SHCTX "Software\Classes\P7MFile\shell\open\command" "" "$\"$INSTDIR\bin\kleopatra.exe$\" $\"%1$\""
+  WriteRegStr SHCTX "Software\Classes\P7MFile\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+
+  WriteRegExpandStr SHCTX "Software\Classes\P7SFile\shell\open\command" "" "$\"$INSTDIR\bin\kleopatra.exe$\" $\"%1$\""
+  WriteRegStr SHCTX "Software\Classes\P7SFile\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+
 !endif
 ${MementoSectionEnd}
 
index 797aaf7..d6d96aa 100644 (file)
@@ -229,6 +229,11 @@ Section "-un.kleopatra"
   DeleteRegValue SHCTX "Software\Classes\.crl" "gpg4win.AssocFile.kleopatra.CMS"
   DeleteRegValue SHCTX "Software\Classes\.crl" "gpg4win.AssocFile.kleopatra.CMS"
 
+  DeleteRegKey SHCTX "Software\Classes\P7SFile\DefaultIcon"
+  DeleteRegKey SHCTX "Software\Classes\P7SFile\shell\open\command"
+  DeleteRegKey SHCTX "Software\Classes\P7MFile\DefaultIcon"
+  DeleteRegKey SHCTX "Software\Classes\P7MFile\shell\open\command"
+
   DeleteRegKey SHCTX "Software\Classes\openpgp4fpr"
 
   DeleteRegKey /ifempty SHCTX "Software\Classes\.gpg"