// 在最后一支文件安装结束之后调用MyAfterInstall
[Files]
Source: ".\mysql2\*"; DestDir: "{app}"; Flags: onlyifdoesntexist recursesubdirs createallsubdirs ignoreversion;
Source: ".\API.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\API2.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\mysql.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\service2.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\service.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\Web.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\Web2.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
Source: ".\if_openwebsite.ini"; DestDir: "{app}"; AfterInstall: MyAfterInstall; Flags: onlyifdoesntexist
// 在code段中实现MyAfterInstall函数
[Code]
procedure MyAfterInstall();
begin
RegWriteStringValue(HKEY_CURRENT_USER, 'Software\Pantum\PiPME\settings',
'path', ExpandConstant('{app}'));
end;
结果: