2011-01-28 167 views

回答

2

您可以創建一個CurUninstallStepChanged例程來執行所需的任何自定義操作,例如在卸載過程中刪除系統上的文件。

看看這個例子(從this question):

procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep); 
var 
    mres : integer; 
begin 
    case CurUninstallStep of 
    usPostUninstall: 
     begin 
     mres := MsgBox('Do you want to delete saved files?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) 
     if mres = IDYES then 
      DelTree(ExpandConstant('{userdocs}\MyApp'), True, True, True); 
     end; 
    end; 
end; 
+0

但將管理員有權限的用戶的文件夾刪除的文件? (BTW很高興在這裏看到一個Chapín) – 2011-01-28 16:45:25

相關問題