Нет способа ограничить запуск сайта только кнопкой «Нет».Вы можете использовать процедуру DeinitializeUninstall
для выполнения действий при завершении деинсталляции (что происходит как при нажатии «Да», так и при «Нет»).
Вот пример запуска сайта в нескольких разных местах:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{15B3741D-9217-4F84-971A-9F5DD837B50B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[code]
function InitializeUninstall(): Boolean;
var
ErrCode : integer;
begin
//This will launch the website before the "Do you want to remove..." dialog
ShellExec('open', 'http://google.com/', '', '', SW_SHOW, ewNoWait, ErrCode);
result := true;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
ErrCode : integer;
begin
//This will launch the website after "yes" is clicked in the "Do you want to remove..." dialog.
ShellExec('open', 'http://google.com/', '', '', SW_SHOW, ewNoWait, ErrCode);
end;