Inno Setup: how do I specify multiple directories for Select Destination Location page?

前端 未结 1 1060
暗喜
暗喜 2021-01-06 13:02

I have an installer, which contains a 32-bit and 64-bit dll. On 64-bit systems I want to install both versions, on 32-bit systems, just the 32-bit version.

My

相关标签:
1条回答
  • 2021-01-06 13:24

    The easiest is to add an additional page for the second directory.

    For examples see:

    • the Prompt for an additional folder for data article on ISXKB;
    • Inno Setup with three destination folders.

    You can of course also add the second box to the standard "Select Destination Location" page. But that's more work.


    Easier to implement might actually be to disable the "Select Destination Location" page altogether (by setting DisableDirPage to yes) and implement a new similar page using the technique described above.

    In this case, make sure you set the installation directory to one of the selected custom directories, so that Inno Setup knows where to store uninstallation data to. Otherwise Inno Setup will still create the directory set by the DefaultDirName (and will store the uninstallation data there). Or set the CreateAppDir to no. Though that will make Inno Setup store uninstallation information to {win}, what is not nice.

    For complete solution, see
    Use two/multiple selected directories from custom page in Files section.


    As for the second question: The problem is that you actually install the files to fixed location, the "program files", using the {pfXX} constants. To install to the location selected by the user on the "Select Destination Location" page, you have to use the {app} constant.

    0 讨论(0)
提交回复
热议问题