It depends on which installer you are using, I would not recommend the BigSQL installer as it does not follow the usual data directory naming conventions.
In the
[Files] section include the PostgreSQL exe as {tmp}\postgresql.
In the
[RUN] section for a normal install:
Filename: "{tmp}\postgresql-9.3.1-1-windows-x64.exe"; Parameters: "--unattendedmodeui minimal --mode unattended --superpassword ""postgres"" --serverport 5432";
BigSQL install:
Filename: "{tmp}\PostgreSQL-9.6.0-1b-win64-bigsql.exe"; Parameters: " --mode unattended --unattendedmodeui minimal --installer-language en --prefix ""C:\PostgreSQL"" --pgdatadir ""C:\PostgreSQL\data\pg96"" --password mypass";