Skip to content

Commit

Permalink
Will delete old Buzz files when installing new version (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored Nov 24, 2024
1 parent 5255cef commit 21e7c2c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,24 @@ begin
then
RegDeleteKeyIncludingSubkeys(HKEY_CURRENT_USER, '{#AppRegKey}');
end;
end;
procedure DeleteFileOrFolder(FilePath: string);
begin
if FileExists(FilePath) then
begin
DeleteFile(FilePath);
end
else if DirExists(FilePath) then
begin
DelTree(FilePath, True, True, True);
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then
begin
DeleteFileOrFolder(ExpandConstant('{app}\Buzz.exe'));
DeleteFileOrFolder(ExpandConstant('{app}\_internal'));
end;
end;

0 comments on commit 21e7c2c

Please sign in to comment.