EnterpriseDB / edb-installers

PostgreSQL installers packaged by EDB
33 stars 8 forks source link

Visual C++ redistributable missing when running installer in unattended mode #155

Closed bchitimus19 closed 1 month ago

bchitimus19 commented 2 months ago

Visual C++ redistributable is missing when running installer in unattended mode. I am running the installer with a options file and during the installation I see that an executable getlocales.exe is launched and this one needs Visual C++ 2015-2022 redistributable that is not installed at this point and fails the installation. The graphical installation is ok.

sandeep-edb commented 1 month ago

Hi @bchitimus19 thanks for the report. Can you share the version of the PostgreSQL installer?

bchitimus19 commented 1 month ago

Hi, I noticed this issue with both installers:- postgresql-15.8-1-windows-x64.exe- postgresql-15.7-2-windows-x64.exe This is how I call the installer from the command line:postgresql-15.8-1-windows-x64.exe --optionfile PgInstallOptions.ini

and the option file contains: mode=unattendedsuperaccount=postgressuperpassword=create_shortcuts=1prefix=C:\Program Files\PostgreSQL\15datadir=zzz:\PG15Dataserverport=5432install_runtimes=0 When I call this in the command line and my computer don't have any Visual C++ redistributable installed I get this weird message:

Then when I go to that path C:\users\administrator\AppData\Local\Temp\1\postgresql_inst.................... and run getlocales.exe in the command line then I get the specific error for missing Visual C++ Redistributable which is msvcrt140.dll missing or something like that. Funny thing is that after the first fail if I attempt to call the installer again in the command line, then it works fine, which I think even the first time it fails to install the VC++Redist before calling getlocales.exe I believe it does install the VC++Redist after. Hope this helps.

On Wednesday, September 11, 2024 at 04:48:49 AM EDT, Sandeep Thakkar ***@***.***> wrote:  

Hi @bchitimus19 thanks for the report. Can you share the version of the PostgreSQL installer?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

muralikrishna05 commented 1 month ago

Hi @bchitimus19 This is expected behaviour with 'install_runtimes=0' option in GUI and unattended mode as well. If you don't have Visual C++ redistributable installed in your machine then don't use 'install_runtimes=0' option as by default installer install the VC redistributable in GUI and unattended mode.

bchitimus19 commented 1 month ago

Hi, Thank you for your help. I tried and works fine now. I am wondering how this worked before for me with previous versions of PostgreSQL like 9 and 10. Thanks On Wednesday, September 18, 2024 at 02:15:29 AM EDT, muralikrishna05 @.***> wrote:

Hi @bchitimus19 This is expected behaviour with 'install_runtimes=0' option in GUI and unattended mode as well. If you don't have Visual C++ redistributable installed in your machine then don't use 'install_runtimes=0' option as by default installer install the VC redistributable in GUI and unattended mode.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>