Hi,
I am using Innosetup to install an msi(made using visual studio) based on certain conditions. The conditions are evaluated correctly and Msi is able to run successfully. The interface of MSI installation has a cancel button. If I click on cancel button in msi, I want innosetup installation to stop and roll back. Project requirements are such that I need to show the interface of MSI so not showing the interface of msi is not an option. Can I programmatically call cancel button click of Innosetup. I tried to use CancelButtonClick event but it does not work. Also tried to use AfterInstal event, but could not rollback the installation. I can abruptly close the Innosetup exe but that does not rollback the changes. My goal is to clear the extracted files and also clear the registry of any entries if msi is not successfully installed.
Here is the script that I am using-
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
WizardForm.Close;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var CurPageID: Integer;
var Cancel1 :Boolean;
var Confrm :Boolean;
begin
if CurStep = ssPostInstall then
begin
try
CurPageID := wpInstalling;
Cancel1 :=true;
Confrm :=false;
CancelButtonClick(CurPageID, Cancel1,Confrm);
except
ShowExceptionMessage;
end;
end;
end;
[Run]
Filename: "{sys}\msiexec.exe";Parameters :"/i ""{app}\MyApp.msi"" /qb ARPSYSTEMCOMPONENT=1 "; WorkingDir : {app};Check:IsFrameworkInstalled();
Rgds
Sent from Mail for Windows
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/SJ0PR18MB4963A066A5965EF0BD5B7E67E2F6A%40SJ0PR18MB4963.namprd18.prod.outlook.com.