Source: "ServMan.exe"; DestDir: "{app}"; Flags: ignoreversion deleteafterinstall However, I need this file in the PrepareToInstall function, and it seems that Files is executed after PrepareToInstall.