You don’t run some psql.exe file, but the file C:\Program Files\PostgreSQL\10\scripts\runpsql.bat , for example programmatically, e.g. from AHK:
run, “C:\Program Files\PostgreSQL\10\scripts\runpsql.bat”
Then you get a generic Windows command window which asks you the right questions (see above) and, when answered correctly, gives you the psql command prompt.