I am currently working at a pure E4 RCP application and I have made an .exe installer using NSIS. Also I have associated a certain file extension to be opened via double click by my application. File association is done using the following NSIS script:
WriteRegStr HKCR ".myext" "" "MyAPP.project"
WriteRegStr HKCR "MyAPP.project" "" \
"MyAPP project file"
WriteRegStr HKCR "MyAPP.project\DefaultIcon" "" \
"$INSTDIR\MyAPP.ico"
WriteRegStr HKCR "MyAPP.project\shell\open\command" "" \
'"$INSTDIR\MyAPP.exe" "%1"'
Call RefreshShellIcons
If I double click on a .myext file, the application doesn't start properly (worth to mention that I have handled in my code the interpretation of this event) by this I mean that is looking that something has crashed. The weird part is that if the .myext file is in the same directory with the .exe file of my application or if I drag-and-drop over the shortcut made on Desktop the application works like a charm. I think that I am doing wrong the file type association using NSIS script. Any help will be appreciated. Thanks you.