CrackMe -- по поводу тасков выше уже ответили. А по поводу ассоциаций, я бы предложил сделать чуть иначе. Ниже пример создания ассоциаций расширений ext1, ext2, ext3 с ноутпадом :
Код:
[Setup]
AppName=My Program
AppVerName=My Program v.1.2
DefaultDirName={pf}\My Program
ChangesAssociations=yes
[Tasks]
Name: MostVideo; Description: "Most Video Files "; GroupDescription: "Associate Video Files:"
Name: MostVideo\DiracVideo; Description: "Dirac"; GroupDescription: "Associate Video Files:"
Name: MostVideo\AviVideo; Description: "AVI"; GroupDescription: "Associate Video Files:"
Name: MostVideo\MP4Video; Description: "MP4"; GroupDescription: "Associate Video Files:"
[Files]
Source: Files\new.ext1; DestDir: {app}
Source: Files\new.ext2; DestDir: {app}
Source: Files\new.ext3; DestDir: {app}
[Registry]
; .ext1
Root: HKCR; Subkey: ".ext1"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile1"; Flags: uninsdeletevalue; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile1"; ValueType: string; ValueName: ""; ValueData: "My Program File №1"; Flags: uninsdeletekey; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile1\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{sys}\notepad.exe,0"; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile1\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{sys}\notepad.exe"" ""%1"""; Tasks: MostVideo\DiracVideo
; .ext2
Root: HKCR; Subkey: ".ext2"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile2"; Flags: uninsdeletevalue; Tasks: MostVideo\AviVideo
Root: HKCR; Subkey: "MyProgramFile2"; ValueType: string; ValueName: ""; ValueData: "My Program File №2"; Flags: uninsdeletekey; Tasks: MostVideo\AviVideo
Root: HKCR; Subkey: "MyProgramFile2\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{sys}\notepad.exe,0"; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile2\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{sys}\notepad.exe"" ""%1"""; Tasks: MostVideo\AviVideo
; .ext3
Root: HKCR; Subkey: ".ext3"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile3"; Flags: uninsdeletevalue; Tasks: MostVideo\MP4Video
Root: HKCR; Subkey: "MyProgramFile3"; ValueType: string; ValueName: ""; ValueData: "My Program File №3"; Flags: uninsdeletekey; Tasks: MostVideo\MP4Video
Root: HKCR; Subkey: "MyProgramFile3\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{sys}\notepad.exe,0"; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile3\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{sys}\notepad.exe"" ""%1"""; Tasks: MostVideo\MP4Video
Код:
[Setup]
AppName=My Program
AppVerName=My Program v.1.2
DefaultDirName={pf}\My Program
ChangesAssociations=yes
[Tasks]
Name: MostVideo; Description: "Most Video Files "; GroupDescription: "Associate Video Files:"
Name: MostVideo\DiracVideo; Description: "Dirac"; GroupDescription: "Associate Video Files:"
Name: MostVideo\AviVideo; Description: "AVI"; GroupDescription: "Associate Video Files:"
Name: MostVideo\MP4Video; Description: "MP4"; GroupDescription: "Associate Video Files:"
[Files]
Source: Files\new.ext1; DestDir: {app}
Source: Files\new.ext2; DestDir: {app}
Source: Files\new.ext3; DestDir: {app}
[Registry]
; .ext1
Root: HKCR; Subkey: ".ext1"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile1"; Flags: uninsdeletevalue; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile1"; ValueType: string; ValueName: ""; ValueData: "My Program File №1"; Flags: uninsdeletekey; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile1\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{sys}\notepad.exe,0"; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile1\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{sys}\notepad.exe"" ""%1"""; Tasks: MostVideo\DiracVideo
; .ext2
Root: HKCR; Subkey: ".ext2"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile2"; Flags: uninsdeletevalue; Tasks: MostVideo\AviVideo
Root: HKCR; Subkey: "MyProgramFile2"; ValueType: string; ValueName: ""; ValueData: "My Program File №2"; Flags: uninsdeletekey; Tasks: MostVideo\AviVideo
Root: HKCR; Subkey: "MyProgramFile2\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{sys}\notepad.exe,0"; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile2\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{sys}\notepad.exe"" ""%1"""; Tasks: MostVideo\AviVideo
; .ext3
Root: HKCR; Subkey: ".ext3"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile3"; Flags: uninsdeletevalue; Tasks: MostVideo\MP4Video
Root: HKCR; Subkey: "MyProgramFile3"; ValueType: string; ValueName: ""; ValueData: "My Program File №3"; Flags: uninsdeletekey; Tasks: MostVideo\MP4Video
Root: HKCR; Subkey: "MyProgramFile3\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{sys}\notepad.exe,0"; Tasks: MostVideo\DiracVideo
Root: HKCR; Subkey: "MyProgramFile3\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{sys}\notepad.exe"" ""%1"""; Tasks: MostVideo\MP4Video