I am using Inno Setup to create an installer for my application. The installer is very basic and just copies some files. This works very well and I am happy with it.
In this case, it's best to remove the postinstall flag so it runs unconditionally at the end of the setup process (but before it says finished) and add a Check:
parameter to limit it to the correct bitness:
[Run]
Filename: "{app}\driver\IviSharedComponents_2.2.1.exe"; StatusMsg: "Installing USB driver (IVI Foundation)"; Check: Not IsWin64(); Flags: skipifsilent
Filename: "{app}\driver\IviSharedComponents64_2.2.1.exe"; StatusMsg: "Installing USB driver (IVI Foundation)"; Check: IsWin64(); Flags: skipifsilent
If you want this to be conditional, you can use a normal [Tasks]
entry that prompts before the setup starts.