mirror of
https://github.com/chidiwilliams/buzz.git
synced 2024-06-29 13:10:26 +02:00
Adding option to delete settings on uninstall (#765)
This commit is contained in:
parent
618b75a62b
commit
bc1465ffd1
|
@ -6,6 +6,7 @@
|
|||
#define AppIconPath "assets\buzz.ico"
|
||||
#define AppSourcePath "dist\Buzz\*"
|
||||
#define OutputDir "dist"
|
||||
#define AppRegKey "Software\Buzz"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
|
||||
|
@ -43,3 +44,17 @@ Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: deskto
|
|||
[Run]
|
||||
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Registry]
|
||||
Root: HKCU; Subkey: "{#AppRegKey}"
|
||||
|
||||
[Code]
|
||||
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
|
||||
begin
|
||||
if CurUninstallStep = usPostUninstall then
|
||||
begin
|
||||
if RegKeyExists(HKEY_CURRENT_USER, '{#AppRegKey}') then
|
||||
if MsgBox('Do you want to delete Buzz settings?', mbConfirmation, MB_YESNO) = IDYES
|
||||
then
|
||||
RegDeleteKeyIncludingSubkeys(HKEY_CURRENT_USER, '{#AppRegKey}');
|
||||
end;
|
||||
end;
|
Loading…
Reference in a new issue