Comment 12 for bug 1654461

Revision history for this message
uwestoehr (uwestoehr) wrote :

> Great! Please provide a patch if you know the "correct" registry settings. ;-)

This is the NSIS code I use for the installer of the program LyX (www.lyx.org) to register the file extension ".lyx":

------------------
  ${if} $CreateFileAssociations == "true"
   WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\App Paths\LyX.exe" "" "$INSTDIR\bin\lyx.exe"
  ${endif}

  # Write information about file type
  #!define REG_FILETYPE 'WriteRegStr SHCTX "Software\Classes\LyX.Document"'

  ${if} $CreateFileAssociations == "true"
   WriteRegStr SHCTX "Software\Classes\LyX.Document" "" "LyX Document"
   WriteRegStr SHCTX "Software\Classes\LyX.Document\DefaultIcon" "" "$INSTDIR\bin\lyx.exe,0"
   WriteRegStr SHCTX "Software\Classes\LyX.Document\Shell\open\command" "" '"$INSTDIR\bin\lyx.exe" "%1"'
--------------------

For Inkscape "$INSTDIR\bin\lyx.exe" is just "$INSTDIR\inkscape.exe".