PostgreSQL 11 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 11 from the command line using the EXE installer.

How to Install PostgreSQL 11 Silently

PostgreSQL 11 Silent Install (EXE)

  1. Navigate to:
  2. Select the Windows x86-64 Download link for PostgreSQL Version 11
  3. Download the postgresql-11.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-11.x-x-windows-x64.exe --unattendedmodeui none --mode unattended

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

Software Title:PostgreSQL 11
Vendor:PostgreSQL Global Development Group
Installer Type:EXE
Silent Install Switch:postgresql-11.x-x-windows-x64.exe --unattendedmodeui none --mode unattended
Silent Uninstall Switch:"%ProgramFiles%\PostgreSQL\11\uninstall-postgresql.exe" --mode unattended
Download Link:PostgreSQL 11 Download
PowerShell Script:PostgreSQL 11 | PowerShell Script
Detection Script:PostgreSQL 11 | 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
--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\11
--datadir <datadir>Data Directory
Default: C:\Program Files\PostgreSQL\11\data
--superpassword <superpassword>Password
--serverport <serverport>Port
Default: 5432
--locale <locale>Locale

How to Uninstall PostgreSQL 11 Silently

Check out the following posts for a scripted solution:

PostgreSQL 11 Install and Uninstall (PowerShell)
PostgreSQL 11 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 11 Silent Uninstall (EXE)

"%ProgramFiles%\PostgreSQL\11\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.

Jason Bergner

I am an accomplished Software Engineer at Patch My PC, leveraging more than 18 years of hands-on experience in Configuration Manager administration and application packaging. I am driven by a genuine passion for solving complex problems and consistently strive to discover innovative and effective solutions. Sharing my extensive knowledge of application deployments is a true joy for me, and I am honored to contribute to the community here at Silent Install HQ.

Recent Posts