1
当我用我的Inno Setup卸载程序卸载我的应用程序时,用户的AppData文件夹中创建的运行时文件仍然保留。是否有可能将其删除?如何使用Inno Setup清除用户的应用程序数据文件夹?
当我用我的Inno Setup卸载程序卸载我的应用程序时,用户的AppData文件夹中创建的运行时文件仍然保留。是否有可能将其删除?如何使用Inno Setup清除用户的应用程序数据文件夹?
您可以创建一个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;
但将管理员有权限的用户的文件夹删除的文件? (BTW很高兴在这里看到一个Chapín) – 2011-01-28 16:45:25