Reputation: 966
I want the user to select a license file during the installation, how can I create this kind of dialog? Can anyone show some sample code?
Upvotes: 4
Views: 1974
Reputation: 125651
There is a code example in the Inno Setup documentation (see "Pascal Scripting", "Support Functions Reference", "Dialog functions" - you can start here):
var
FileName: string;
begin
// Set the initial filename
FileName := '';
if GetOpenFileName('', FileName, '',
'Text Documents (*.txt)|*.txt|All Files|*.*', 'txt') then
begin
// Successful; user clicked OK
// Filename contains the selected filename
end;
end;
Upvotes: 6