When I uninstall my app with my Inno Setup uninstaller, the runtime files created in the user's AppData folder remain. Is it possible to remove them?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
you can create a CurUninstallStepChanged routine to perform any custom action you want, like deleting files on the system during uninstall.
Take a look at this example (from 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;