I'm using code from How do you execute command line tools without using batch file in Inno Setup response to execute all my batch files on installation (before, after).
Now I want to execute them just when user click "YES" to uninstaller, but can't find a way to do it. It executes before the confirmation
Here is my code from [Code]
section:
function InitializeUninstall(): Boolean;
var
ResultCode : Integer;
begin
Result := True;
Exec(ExpandConstant('{app}\scripts\unset.bat'), '', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;