我想进入一个文件夹。如果是64位系统,则为
这是我尝试过的代码(但没有成功):
Program Files (x86)
,如果是32位,则为Program Files
。如何在Inno setup中实现。这是我尝试过的代码(但没有成功):
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep);
var
mres : integer;
begin
case CurUninstallStep of
usPostUninstall:
begin
mres := MsgBox('Do you want to delete saved games?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
if mres = IDYES then
if ProcessorArchitecture = paIA64 then
begin
if IsWin64 then
DelTree(ExpandConstant('{userappdata}\Local\VirtualStore\Program Files (x86)\MY PROJECT'), True, True, True);
else
DelTree(ExpandConstant('{userappdata}\Local\VirtualStore\Program Files\MY PROJECT'), True, True, True);
end;
end;
end;
end;