command-lineinno-setup

List available custom parameters and components in Inno Setup


In Inno Setup you can define components and customized parameters, e.g.

[Components]
Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
Name: "help"; Description: "Help Files"; Types: full

[Files]
Source: "myFile.txt"; DestDir: "{app}"; Check: MyDirCheck(ExpandConstant('{param:myParam|{pf}'))

When someone likes to run my setup from command line

setup.exe /SILENT /myParam="c:\Programs" /COMPONENTS="main,help"

how does he knows the exact names of components main and help and custom parameter myParam?

Is there any command line parameter to interrogate them from the setup or do I have to provide this information manually in an installation manual?


Solution

  • For the custom parameter I expected that wouldn't be possible without a customized message. But for the components I found a solution. Run the setup manually with option /SAVEINF="filename".

    The INF file shows the SetupType and installed components:

    [Setup]
    SetupType=custom
    Components=main
    

    I think it is quite normal, when you have to install an application with a software distribution tool, then you first run the setup manually with UI for testing. From there you can get the component names.