I used the Advanced Installer tool to package the PostgreSQL database into an executable installation file. Below is a piece of PowerShell code I used to install PostgreSQL.
# Install PostgreSQL
# Get service pwd for current user
$svcPwd = "xxxx"
$postgresqlSA = "xxxx"
$domain = $env:USERDOMAIN
$username = $env:USERNAME
$fullUsername = "$domain\$username"
$installerPath = "$workingPath\postgresql-16.1-1-windows-x64.exe"
$installArgs = "--mode unattended --unattendedmodeui none --superpassword $postgresqlSA --serviceaccount $fullUsername --servicepassword $svcPwd --prefix `"C:\Program Files\PostgreSQL\16`" --datadir `"C:\Program Files\PostgreSQL\16\data`" --serverport 5432"
During the installation process, I encountered the following error. I am certain that the password I entered is correct. Is this error due to an issue with my user permissions or is it a problem with PostgreSQL?
Script stderr:
Executing C:\Users\APIserviceuser\AppData\Local\Temp\postgresql_installer_e92eebb991\validateuser.exe "RTMIMU09" "APIserviceuser" "****"
Script exit code: 1
Script output:
Incorrect password for user 'RTMIMU09\APIserviceuser'.
Script stderr:
Program ended with an error exit code