PostgreSQL 14 Silent Install (How-To Guide)

PostgreSQL is an open-source relational database management system known for its robustness, extensibility, and compliance with SQL standards. It supports advanced data types, extensibility, high availability features, and has a strong open-source community, making it a popular choice for a wide range of applications, from small projects to large-scale enterprises. 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: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
  2. Select the Windows x86-64 Download link for PostgreSQL Version 14
  3. Download the postgresql-14.x-x-windows-x64.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 --unattendedmodeui none --mode unattended

After a few 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
Version:14
Architecture:x64
Installer Type:EXE
Silent Install Switch:postgresql-14.x-x-windows-x64.exe --unattendedmodeui none --mode unattended
Silent Uninstall Switch:"%ProgramFiles%\PostgreSQL\14\uninstall-postgresql.exe" --mode unattended
Download Link:PostgreSQL 14 Download
PowerShell Script:PostgreSQL 14 | PowerShell Script
Detection Script:PostgreSQL 14 | Custom Detection 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
Default:
--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
Default:
--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
Default:
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.
Default:
--serviceaccount <serviceaccount>Sets the operating system user account that owns the server process. Defaults to ‘postgres’.
Default:
--servicepassword <servicepassword>Sets the password for the operating system user account that owns server process. Defaults to superuser password.
Default:
--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\14
--datadir <datadir>Data Directory
Default: C:\Program Files\PostgreSQL\14\data
--superpassword <superpassword>Password
Default:
--serverport <serverport>Port
Default: 5432
--locale <locale>Locale
Default:

How to Uninstall PostgreSQL 14 Silently

Check out the following posts for a scripted solution:

PostgreSQL 14 Install and Uninstall (PowerShell)
PostgreSQL 14 Silent Uninstall (PowerShell)
  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter the following command:

PostgreSQL 14 Silent Uninstall (EXE)

"%ProgramFiles%\PostgreSQL\14\uninstall-postgresql.exe" --mode unattended

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.