Skip to content

Commit

Permalink
Fixed LoadInf support for /SuppressMsgBoxes and /NoCancel.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Oct 5, 2012
1 parent d5492c8 commit d6e0374
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Projects/Main.pas
Expand Up @@ -607,7 +607,7 @@ function SlashesToBackslashes(const S: String): String;
Result[I] := '\';
end;

procedure LoadInf(const FileName: String);
procedure LoadInf(const FileName: String; var WantToSuppressMsgBoxes: Boolean);
const
Section = 'Setup';
var
Expand Down Expand Up @@ -637,8 +637,10 @@ procedure LoadInf(const FileName: String);
InitNoCloseApplications := GetIniBool(Section, 'NoCloseApplications', InitNoCloseApplications, FileName);
InitRestartApplications := GetIniBool(Section, 'RestartApplications', InitRestartApplications, FileName);
InitNoRestartApplications := GetIniBool(Section, 'NoRestartApplications', InitNoRestartApplications, FileName);
InitNoCancel := GetIniBool(Section, 'NoCancel', InitNoCancel, FileName);
InitPassword := GetIniString(Section, 'Password', InitPassword, FileName);
InitRestartExitCode := GetIniInt(Section, 'RestartExitCode', InitRestartExitCode, 0, 0, FileName);
WantToSuppressMsgBoxes := GetIniBool(Section, 'SuppressMsgBoxes', InitSuppressMsgBoxes, FileName);
InitSaveInf := GetIniString(Section, 'SaveInf', InitSaveInf, FileName);
end;

Expand Down Expand Up @@ -2857,7 +2859,7 @@ procedure InitializeSetup;
end;

if InitLoadInf <> '' then
LoadInf(InitLoadInf);
LoadInf(InitLoadInf, WantToSuppressMsgBoxes);

if WantToSuppressMsgBoxes and (InitSilent or InitVerySilent) then
InitSuppressMsgBoxes := True;
Expand Down

0 comments on commit d6e0374

Please sign in to comment.