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

How to Install PostgreSQL 13 Silently

PostgreSQL 13 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 13
  3. Download the file 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-13.0-1-windows-x64.exe --mode unattended --unattendedmodeui none
  7. Press Enter

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

Software Title:PostgreSQL 13
Vendor:PostgreSQL Global Development Group
Version:13
Architecture:x64
Installer Type:EXE
Silent Install Switch:postgresql-13.0-1-windows-x64.exe --mode unattended --unattendedmodeui none
Silent Uninstall Switch:"%ProgramFiles%\PostgreSQL\13\uninstall-postgresql.exe" --mode unattended --unattendedmodeui none
Download Link:https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
PowerShell Script:https://silentinstallhq.com/postgresql-install-and-uninstall-powershell/

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\12
--datadir <datadir>Data Directory
Default: C:\Program Files\PostgreSQL\12\data
--superpassword <superpassword>Password
Default:
--serverport <serverport>Port
Default: 5432
--locale <locale>Locale
Default:

How to Uninstall PostgreSQL 13 Silently

  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter the following command for PostgreSQL 13:
"%ProgramFiles%\PostgreSQL\13\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