Archive: Registering .ics files to a new application


Registering .ics files to a new application
Hi All,

I know there is some topics in teh forum already about registering files types to applications, but I have not had much luck in getting my new application to be the default application to open a .ics file (the current default is Outlook).

This is the code I am using in the NSIS script

WriteRegStr HKCR "icsfile" "shell" ""
WriteRegStr HKCR "icsfile\shell" "open" ""
WriteRegStr HKCR "icsfile\shell\open" "command" ""
WriteRegStr HKCR "icsfile\shell\open\command" "" '$INSTDIR\MyApp.exe "%1"'

WriteRegStr HKLM "Software\Classes\MyApp.AssocFile.ICS" "" "ICS Calendar File"

WriteRegStr HKLM "Software\Classes\MyApp.AssocFile.ICS\shell\open\command" "" '$INSTDIR\MyApp.exe "%1"'

WriteRegStr HKLM "Software\MyApp\Capabilities" "" "Application Description = MyApp"

WriteRegStr HKLM "Software\MyApp\Capabilities\FileAssociation" "" ".ics = MyApp.AssocFile.ICS"

WriteRegStr HKLM "Software\RegisteredApplications" "" "MyApp= Software\MyApp\Capabilities"


Yet when I double click on a .ics file Outlook is always launched.

Thanks for any help,


Mike


Make sure that .ics is linked to icsfile:

WriteRegStr HKCR .ics `` icsfile

Stu


Thank you that worked.