Пример почти как на скрине. Зачем вам такой велосипед?
Код:

#define MyAppName "Test"
#define MyAppVersion "1.0"
[setup]
appid=test1
appname={#MyAppName}
appvername={#MyAppVersion}
DefaultDirName={sd}\{#MyAppName}
[code]
var
BtnDel, BtnNDel: TNewRadioButton;
function CheckChoose(): Boolean;
var
ShowForm: TSetupForm;
begin
ShowForm := CreateCustomForm;
ShowForm.Position:=poScreenCenter;
try
ShowForm.ClientWidth := ScaleX(410);
ShowForm.ClientHeight := ScaleY(170);
ShowForm.BorderStyle := bsSingle;
ShowForm.BorderIcons := [biSystemMenu];
ShowForm.Caption := '{#MyAppName} {#MyAppVersion}';
with TNewButton.Create(ShowForm) do
begin
Parent := ShowForm;
SetBounds(ScaleX(110), ScaleY(120), ScaleX(90), ScaleY(25));
ModalResult := mrYes;
Caption := 'OK';
end;
with TNewStaticText.Create(ShowForm) do
begin
Parent:= ShowForm;
Caption:='Мастер может выполнить поиск предыдущей версии {#MyAppName} {#MyAppVersion} и'+ #13#10 +
'удалить её. Вы хотите удалить предыдущую версию?';
Left:=ScaleX(20);
Top:=ScaleY(20);
Font.Name:= 'Tahoma';
Font.Size:= 9;
Font.Color:=clBlack;;
end;
BtnDel := TNewRadioButton.Create(ShowForm);
with BtnDel do
begin
Parent := ShowForm;
Left := ScaleX(20);
Top := ScaleY(60);
Width := ScaleX(200);
Height := ScaleY(17);
Caption := 'Да, удалить предыдущую версию';
Checked := True;
end;
BtnNDel := TNewRadioButton.Create(ShowForm);
with BtnNDel do
begin
Parent := ShowForm;
Left := ScaleX(20);
Top := ScaleY(80);
Width := ScaleX(272);
Height := ScaleY(17);
Caption := 'Нет, установить с заменой';
end;
with TNewButton.Create(ShowForm) do
begin
Parent := ShowForm;
SetBounds(ScaleX(210), ScaleY(120), ScaleX(90), ScaleY(25));
ModalResult := mrcancel;
Caption := SetupMessage(msgButtonCancel);
end;
Result := (ShowForm.ShowModal = mrYes);
finally
ShowForm.Free;
end;
end;
function TrueDel: boolean;
begin
result := BtnDel.Checked;
end;
function FalseDel: boolean;
begin
result := BtnNDel.Checked;
end;
function UninstallApp(): Boolean;
var
Buff: String;
i: Integer;
begin
Result := not RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + ExpandConstant( '{#SetupSetting( "AppId" )}_is1' ), 'UninstallString', Buff );
if not Result then
begin
Result := not FileExists(RemoveQuotes(Buff));
if not Result then
try
Exec(RemoveQuotes(Buff), '', ExtractFilePath(RemoveQuotes(Buff)), SW_SHOW, ewWaitUntilTerminated, i);
finally
Result := not RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + ExpandConstant( '{#SetupSetting( "AppId" )}_is1' ), 'UninstallString', Buff );
if not Result then result := false; end;
end else MsgBox('Программа не найдена!', mbError, MB_OK);
end;
function InitializeSetup(): Boolean;
begin
if CheckChoose then
if TrueDel then result := UninstallApp else result := false;
if FalseDel then result := true;
end;