We can take a look. We need to know: 1. Was the chosen installation directory indeed present and empty? 2. Was this chosen installation directory a subdirectory of %ProgramFiles%?
The installation setup file opens the directory selection window to ask where to install PostgreSQL, and when I make a new folder to select as the installation directory, it gives me this error message "the chosen installation directory exists and is non-empty. please choose a different directory.". The only way this issue was resolved was by closing the installer "postgresql-17.5-1-windows-x64.exe" and reopening it, then choosing the same folder I just made and then it worked. Thanks for your time and efforts, Parnian Khaleghi