If you need it only once, the simplest built-in solution is to drop the Boolean to Integer and use the IntToStr function . You will get 1 for True and 0 for False .
MsgBox('IsDowngradeUninstall = ' + IntToStr(Integer(Result)), mbInformation, MB_OK);
Although I usually use the Format function for the same result:
MsgBox(Format('IsDowngradeUninstall = %d', [Result]), mbInformation, MB_OK);
(Unlike Delphi) The Inno Setup / Pascal Script Format program implicitly converts Boolean to Integer for %d .
If you need a more bizarre conversion or need frequent conversion, do your own function, as @RobeN already shows in your answer.
function BoolToStr(Value: Boolean): String; begin if Value then Result := 'Yes' else Result := 'No'; end;
source share