一杯清酒邀明月
天下本无事,庸人扰之而烦耳。
 1 [Code]
 2 function InitializeSetup(): boolean;  
 3 var  
 4   ResultStr: String;  
 5   ResultCode: Integer;  
 6 begin  
 7   if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9807F465-69CC-4FFE-936D-F0A5A6C09B45}_is1', 'UninstallString', ResultStr) then  
 8     begin  
 9       ResultStr := RemoveQuotes(ResultStr);  
10       Exec(ResultStr, '/silent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);  
11     end;  
12     result := true;  
13 end;
14  
15 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
16 begin
17   if CurUninstallStep = usDone then
18     begin
19     DelTree(ExpandConstant('{app}'), True, True, True);
20     end;
21 end;

 

posted on 2020-09-03 16:51  一杯清酒邀明月  阅读(774)  评论(0编辑  收藏  举报