Something do not return to me....
This is my Inno Setup script:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "VideoPlayer"
#define MyAppVersion "1.2"
#define MyAppPublisher "DigitalRobotics"
#define MyAppExeName "VideoPlayer.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{A338886B-6B36-9CC2-BBBE-4377EAC4692C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppPublisher}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=.
Compression=lzma
SolidCompression=yes
SetupIconFile=icon.ico
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
OutputBaseFilename=Setup {#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName}
VersionInfoVersion=1.0.0.0
ChangesAssociations=yes
;ChangesAssociations setup .iss script forces Explorer to refresh its file extensions so that the
;icon you specify will be shown on the associated files without a logoff/restart being necessary.
;Su Windows 11 sembra che le icone siano viste senza fare logoff.
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: build\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon
[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent
;[Registry]
;Root: HKCR; SubKey: .rvb; ValueType: string; ValueData: Raw Video Bitmap Files; Flags: uninsdeletekey noerror; Tasks: ; Languages:
;Root: HKCR; SubKey: Raw Video Bitmap Files; ValueType: string; ValueData: Raw Video Bitmap Files; Flags: uninsdeletekey noerror
;Root: HKCR; SubKey: Raw Video Bitmap Files\Shell\Open\Command; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletevalue noerror
;Root: HKCR; Subkey: Raw Video Bitmap Files\DefaultIcon; ValueType: string; ValueData: {app}\{#MyAppExeName},0; Flags: uninsdeletevalue noerror
[Registry]
Root: HKCR; SubKey: .rvb; ValueType: string; ValueData: Raw Video Bitmap Files; Flags: uninsdeletekey noerror; Tasks: ; Languages:
Root: HKCR; SubKey: Raw Video Bitmap Files; ValueType: string; ValueData: Raw Video Bitmap Files; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: Raw Video Bitmap Files\Shell\Open\Command; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletevalue noerror
Root: HKCR; Subkey: Raw Video Bitmap File\DefaultIcon; ValueType: string; ValueData: {app}\bin\raw_video_bitmap_icon.ico,0; Flags: uninsdeletevalue noerror
Root: HKCR; SubKey: .rvj; ValueType: string; ValueData: Raw Video Jpeg Files; Flags: uninsdeletekey noerror; Tasks: ; Languages:
Root: HKCR; SubKey: Raw Video Jpeg Files; ValueType: string; ValueData: Raw Video Jpeg Files; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: Raw Video Jpeg Files\Shell\Open\Command; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletevalue noerror
Root: HKCR; Subkey: Raw Video Jpeg File\DefaultIcon; ValueType: string; ValueData: {app}\bin\raw_video_jpeg_icon.ico,0; Flags: uninsdeletevalue noerror
Even I used these in the IDE:
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ raw_video_bitmap_icon.ico
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ raw_video_jpeg_icon.ico
and copied the icon files to project folder, but after installation, both .rvb and .rvj have te same icon, the app icon, the copied icons are not used at all.
May I'm doing something wrong here ?
Even there is a strange thing, I compiled the app that show Args(0) on a message box,
when I double-click on .rvb file, it open the app and show the file path,
when I double-click on .rvj file, it open the app but the messagebox is void, it do not show the file path here
..... So for sure I managed something wrong. These lines probably contais something wrong:
[Registry]
Root: HKCR; SubKey: .rvb; ValueType: string; ValueData: Raw Video Bitmap Files; Flags: uninsdeletekey noerror; Tasks: ; Languages:
Root: HKCR; SubKey: Raw Video Bitmap Files; ValueType: string; ValueData: Raw Video Bitmap Files; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: Raw Video Bitmap Files\Shell\Open\Command; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletevalue noerror
Root: HKCR; Subkey: Raw Video Bitmap File\DefaultIcon; ValueType: string; ValueData: {app}\bin\raw_video_bitmap_icon.ico,0; Flags: uninsdeletevalue noerror
Root: HKCR; SubKey: .rvj; ValueType: string; ValueData: Raw Video Jpeg Files; Flags: uninsdeletekey noerror; Tasks: ; Languages:
Root: HKCR; SubKey: Raw Video Jpeg Files; ValueType: string; ValueData: Raw Video Jpeg Files; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: Raw Video Jpeg Files\Shell\Open\Command; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletevalue noerror
Root: HKCR; Subkey: Raw Video Jpeg File\DefaultIcon; ValueType: string; ValueData: {app}\bin\raw_video_jpeg_icon.ico,0; Flags: uninsdeletevalue noerror
The associations of .rvb and .rvj files are successfully added to Windows, I can see it on Default Apps/Files by extensions, but the icons doesnt' works and .rvj do not return the path in Args(0).
Attached a screeshot.