PostgreSQL 14 Silent Install (How-To Guide)

PostgreSQL is an open source relational database management system developed by a worldwide team of volunteers. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of PostgreSQL 14 from the command line using the EXE installer.

How to Install PostgreSQL 14 Silently

PostgreSQL 14 Silent Install (EXE)

  1. Navigate to:
  2. Select the Windows x86-64 Download link for PostgreSQL Version 14
  3. Download the EXE to a folder created at (C:\Downloads)
  4. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  5. Navigate to the C:\Downloads folder
  6. Enter the following command:
postgresql-14.x-x-windows-x64.exe --mode unattended --unattendedmodeui none

After several minutes you should see the PostgreSQL 14 shortcuts in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.

Software Title:PostgreSQL 14
Vendor:PostgreSQL Global Development Group
Installer Type:EXE
Silent Install Switch:postgresql-14.x-x-windows-x64.exe --mode unattended --unattendedmodeui none
Silent Uninstall Switch:"%ProgramFiles%\PostgreSQL\14\uninstall-postgresql.exe" --mode unattended --unattendedmodeui none
Download Link:
PowerShell Script:

The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.

Additional Configurations

Available Command Line Parameters

--unattendedmodeui <unattendedmodeui>Unattended Mode UI
Default: minimal
Allowed: none minimal minimalWithDialogs
--optionfile <optionfile>Installation option file
--debuglevel <debuglevel>Debug information level of verbosity
Default: 2
Allowed: 0 1 2 3 4
--mode <mode>Installation mode
Default: qt
Allowed: qt win32 unattended
--debugtrace <debugtrace>Debug filename
--enable-components <enable-components>Comma-separated list of components
Default: server,pgAdmin,stackbuilder,commandlinetools
Allowed: server pgAdmin stackbuilder commandlinetools
--disable-components <disable-components>Comma-separated list of components
Allowed: server pgAdmin stackbuilder commandlinetools
--installer-language <installer-language>Language selection
Default: en
Allowed: en es fr
--extract-only <extract-only>Default: 0
--superaccount <superaccount>Sets the user name of the database superuser. Defaults to ‘postgres’.
Default: postgres
--servicename <servicename>Sets the name of the database service.
--serviceaccount <serviceaccount>Sets the operating system user account that owns the server process. Defaults to ‘postgres’.
--servicepassword <servicepassword>Sets the password for the operating system user account that owns server process. Defaults to superuser password.
--install_runtimes <install_runtimes>Specifies whether or not install the Microsoft Visual C++ runtimes before the installation proceeds.
Default: 1
--enable_acledit <enable_acledit>Check and give the read permissions on the complete data directory path for the service account.
Default: 0
--create_shortcuts <create_shortcuts>Specifies whether or not menu shortcuts should be created.
Default: 1
--prefix <prefix>Installation Directory
Default: C:\Program Files\PostgreSQL\12
--datadir <datadir>Data Directory
Default: C:\Program Files\PostgreSQL\12\data
--superpassword <superpassword>Password
--serverport <serverport>Port
Default: 5432
--locale <locale>Locale

How to Uninstall PostgreSQL 14 Silently

Check out the PostgreSQL Install and Uninstall (PowerShell) post for a scripted solution.

  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter the following command for PostgreSQL 14:
"%ProgramFiles%\PostgreSQL\14\uninstall-postgresql.exe" --mode unattended --unattendedmodeui none

Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.

Recent Posts