Of course you don't necessarily have to use Components. You did not write how you decide which installer to run. If you need more complex logic you could also use Check functions as in:[Files]Source: ClientSetup.msi; DestDir: {tmp}; Flags: deleteafterinstall; Check: CheckClientSource: ServerSetup.msi; DestDir: {tmp}; Flags: deleteafterinstall; Check: CheckServer[Run]Filename: msiexec.exe; Parameters: /i "{tmp}\ClientSetup.msi" /qb INSTALLDIR="{code:GetInstallPath}\Client\" ALLUSERS=2; WorkingDir: {tmp}; StatusMsg: Installing client; Check: CheckClientFilename: msiexec.exe; Parameters: /i "{tmp}\ServerSetup.msi" /qb INSTALLDIR="{code:GetInstallPath}\Server\" ALLUSERS=2; WorkingDir: {tmp}; StatusMsg: Installing server; Check: CheckServer[Code]function CheckClient: Boolean;begin Result := WhateverCondition;end;function CheckServer: Boolean;begin Result := WhateverOtherCondition;end; 这篇关于在Inno Setup中,可以将条件语句添加到要执行的[Run]部分中的内容上吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-28 13:18