目前我已经使用以下代码删除了我的应用程序的旧版本目录,下面的代码通过查找应用程序名称的应用程序正常工作。我想找到使用它的应用程序UNIQUE APPID,有人可以帮我解决这个问题。
procedure DeleteExistingVersion(); begin
MsgBox('Deletion Starts',mbInformation, MB_OK);
if (DirExists (ExpandConstant('{pf}\APPLICATION NAME'))) then
begin
DelTree(ExpandConstant('{pf}\APPLICATION NAME'), True, True, True);
MsgBox('Deletion Ends', mbInformation, MB_OK);
end;
end;
答案 0 :(得分:0)
最好的方法是卸载以前版本的应用,而不是仅通过调用{uninstallexe}
删除树。您可以查看之前发布的两个解决方案:
InnoSetup: How to automatically uninstall previous installed version?