1
Filename: "{app}\program.exe"; Parameters: -d; \
  StatusMsg: "How to put line break after this sentence? This sentence should be on new line."; \
  Flags: runascurrentuser;

I tried + #13#10 + and %n but they didn't worked.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992

2 Answers2

0

The status message line has one line only (so while you can insert a new line into the message, the second line won't show).

The second line is reserved for a file name (when files are being installed).

You can abuse the file name line like this:

[Run]
Filename: "{app}\program.exe"; Parameters: "-d"; \
  StatusMsg: "How to put line break after this sentence?"; Flags: runascurrentuser; \
  BeforeInstall: SetFileName('This sentence should be on new line.'); \
  AfterInstall: SetFileName('')
[Code]

procedure SetFileName(FileName: string);
begin
  WizardForm.FilenameLabel.Caption := FileName;
end;

enter image description here


Another (more complicated) option would be to temporarily make status line higher (multi-line).

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
-1

This code works:

Filename: "{app}\program.exe"; Parameters: -d; StatusMsg: "How to put line break after this sentence?%nThis sentence should be on new line."; Flags: runascurrentuser;

I added the %n as new line symbol. But remember - your application Program.exe must support this symbol and recognize it the as new line (the symbol is passed from Inno Setup correctly).

Slappy
  • 5,250
  • 1
  • 23
  • 29
  • `%n` works in (custom) messages only. And even is you use custom message in `StatusMsg`, the second line won't show. Also note that it's `StatusMsg`, not `Parameters`, so the value has nothing to do with `Program.exe`. – Martin Prikryl Jul 15 '19 at 08:15