Thanks Kaktor, do you think this is good?
Code:
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: Integer;
begin
if CurStep = ssInstall then
begin
CreateDir(ExpandConstant('{app}\Uninstall'));
FileCopy(ExpandConstant('{tmp}\botva2.dll'),ExpandConstant('{app}\Uninstall\botva2.dll'),True);
FileCopy(ExpandConstant('{tmp}\dark.png'),ExpandConstant('{app}\Uninstall\dark.png'),True);
FileCopy(ExpandConstant('{tmp}\light.png'),ExpandConstant('{app}\Uninstall\light.png'),True);
FileCopy(ExpandConstant('{tmp}\Setup1.jpg'),ExpandConstant('{app}\Uninstall\Setup1.jpg'),True);
FileCopy(ExpandConstant('{tmp}\Symbol Font.ttf'),ExpandConstant('{app}\Uninstall\Symbol Font.ttf'),True);
FileCopy(ExpandConstant('{tmp}\bahnschrift.ttf'),ExpandConstant('{app}\Uninstall\bahnschrift.ttf'),True);
Unpack_Process(not RamLimitChk.IsChecked);
end;
if (CurStep = ssPostInstall) and ISDoneError then
begin
SetTaskBarProgressValue(100);
SetTaskBarProgressState(TBPF_ERROR);
Exec(ExpandConstant('{uninstallexe}'), '/VerySilent','', sw_Hide, ewWaitUntilTerminated, ResultCode);
end;
if (CurStep = ssPostInstall) and not ISDoneError then
begin
Exec2(ExpandConstant('{app}\WemTool.exe'), '-d')
#ifdef Redist1