我在这里和他们的论坛上闲逛,然后空了出来.谁能指出我有关如何执行此操作的文档,常见问题解答等? 更新感谢到目前为止的所有反馈(非常棒).因此,看起来我可以使用卸载部分中的{app} *.*指令删除所有内容.看起来每个人都在建议这样做. 现在问题变成了(我想知道这是否应该是一个全新的问题),在卸载过程中是否有一种方法可以让用户询问您是否要删除与此项目相关联的所有项目文件?应用?'如果他们回答是",则运行卸载{app} *.*件?谢谢-解决方案您应该已经提出了一个全新的问题,但是我也会在这里回答您更新的问题.请查看Inno设置文档中的"Pascal脚本:卸载代码" 部分.举例说明如何在卸载过程中有条件地删除数据文件:[Code]procedure DeleteBitmaps(ADirName: string);var FindRec: TFindRec;begin if FindFirst(ADirName + '\*.*', FindRec) then begin try repeat if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY <> 0 then begin if (FindRec.Name <> '.') and (FindRec.Name <> '..') then begin DeleteBitmaps(ADirName + '\' + FindRec.Name); RemoveDir(ADirName + '\' + FindRec.Name); end; end else if Pos('.bmp', AnsiLowerCase(FindRec.Name)) > 0 then DeleteFile(ADirName + '\' + FindRec.Name); until not FindNext(FindRec); finally FindClose(FindRec); end; end;end;procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);begin if CurUninstallStep = usUninstall then begin if MsgBox('Do you want to delete all data files?', mbConfirmation, MB_YESNO) = IDYES then begin DeleteBitmaps(ExpandConstant('{app}')); end; end;end;但是根据您需要清理的内容数量,最好创建一个特殊的帮助程序,该程序是安装的一部分,可以在卸载应用程序时执行(使用 [UninstallRun] 部分).I am new to Inno Setup. Stuck on one issue ~ how to configure the uninstall piece to remove all files, folders, subfolders, and even new files/folders etc. created by application (in other words, a 100% removal of the application and associated files).I hunted around here and also on their forum, and came up empty. Can anyone point me to a document, FAQ etc. regarding how to do this?UPDATEThanks for all the feedback so far (very awesome). So it looks like I can delete everything using the {app}*.* directive in the uninstall section. Also looks like everyone is advising against it. So the question now becomes (I am wondering if this should be a totally new question) is there a way during the uninstall that we can ask the user 'Do you want to remove all project files associated with this application?' and if they answer YES, to run the uninstall {app}*.* piece?Thanks - 解决方案 You should probably have made this a totally new question, but I'll answer your updated question here as well. Have a look at the section "Pascal Scripting: Uninstall Code" in the Inno Setup Documentation.To give an example how to conditionally delete data files as part of the uninstallation process:[Code]procedure DeleteBitmaps(ADirName: string);var FindRec: TFindRec;begin if FindFirst(ADirName + '\*.*', FindRec) then begin try repeat if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY <> 0 then begin if (FindRec.Name <> '.') and (FindRec.Name <> '..') then begin DeleteBitmaps(ADirName + '\' + FindRec.Name); RemoveDir(ADirName + '\' + FindRec.Name); end; end else if Pos('.bmp', AnsiLowerCase(FindRec.Name)) > 0 then DeleteFile(ADirName + '\' + FindRec.Name); until not FindNext(FindRec); finally FindClose(FindRec); end; end;end;procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);begin if CurUninstallStep = usUninstall then begin if MsgBox('Do you want to delete all data files?', mbConfirmation, MB_YESNO) = IDYES then begin DeleteBitmaps(ExpandConstant('{app}')); end; end;end;But depending on the amount of stuff you need to clean up you might be better off to create a special helper program that is part of the installation, and which can be executed during the uninstallation of the app (using an entry in the [UninstallRun] section). 这篇关于如何配置Inno Setup卸载所有内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-07 23:07