EnterpriseDB / edb-installers

PostgreSQL installers packaged by EDB
37 stars 11 forks source link

Windows installer hangs if Batch files are set to open in a specific application (such as a text editor) #183

Closed xenago closed 2 weeks ago

xenago commented 1 month ago

With batch files set at the system level to open by default in another application (such as Notepad++), the installer will hang. Instead of running the file AppData\Local\Temp\rad8A5F4, it opened it:

image

At this point, the install process was hung and I aborted it (presumably, a user could also run the script manually and then close whatever application was inadvertently opened, but I didn't test that).

To temporarily get around this problem, I ran this command to reset the file association, and then reran the installer successfully:

ASSOC .bat=batfile

Maybe this can be avoided by preceding the command running the batch file with call or cmd to ensure it is treated as a script rather than opening whatever the default application is for .bat extension? I think it might be this line that runs it:

https://github.com/EnterpriseDB/edb-installers/blob/de3a56b6ad5072147b01312e130ea46a33216056/server/scripts/windows/initcluster.vbs#L80

Manika-EDB commented 2 weeks ago

Hi, This issue is resolved in this commit: https://github.com/EnterpriseDB/edb-installers/commit/963f07cbe8f7f9dee4b9d63b9a41ef62eedc1f00 Also, this change will be included in the upcoming minor releases on 14th Nov, 2024.

xenago commented 2 weeks ago

Thanks Manika!