2011-01-28 172 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

相关问题