As explained in the answer you linked:
- create a new custom label "file name";
- hide the original
FilenameLabel ; - we implement
CurInstallProgressChanged to match the file name with what you want to display and display it on a custom label.
[Files] Source: "data1.dat"; DestDir: {app} Source: "data2.dat"; DestDir: {app} Source: "data3.dat"; DestDir: {app}
[Code] var MyFilenameLabel: TNewStaticText; procedure InitializeWizard(); begin MyFilenameLabel := TNewStaticText.Create(WizardForm); { Clone the FilenameLabel } MyFilenameLabel.Parent := WizardForm.FilenameLabel.Parent; MyFilenameLabel.Left := WizardForm.FilenameLabel.Left; MyFilenameLabel.Top := WizardForm.FilenameLabel.Top; MyFilenameLabel.Width := WizardForm.FilenameLabel.Width; MyFilenameLabel.Height := WizardForm.FilenameLabel.Height; MyFilenameLabel.AutoSize := WizardForm.FilenameLabel.AutoSize; { Hide real FilenameLabel } WizardForm.FilenameLabel.Visible := False; end; procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer); var Filename: string; begin Filename := ExtractFileName(WizardForm.FilenameLabel.Caption); { Map filenames to descriptions } if CompareText(Filename, 'data1.dat') = 0 then Filename := 'Some hilarious videos' else if CompareText(Filename, 'data2.dat') = 0 then Filename := 'Some awesome pictures' else if CompareText(Filename, 'data3.dat') = 0 then Filename := 'Some cool music'; MyFilenameLabel.Caption := Filename; end;

source share