0

I have this .bat file:

set INSTALL_PATH=%1
set CONFIG_PATH=%2
set DB_PASSWORD=%3
set DB_PORT=%4
set DB_PASSWORD=%DB_PASSWORD:"=%
set DB_PORT=%DB_PORT:"=%

%INSTALL_PATH% --mode unattended --unattendedmodeui minimal --disable-components stackbuilder --superpassword %DB_PASSWORD% --serverport %DB_PORT% --debugtrace postgres_install_logs.txt
powershell -Command "(gc '%CONFIG_PATH%' -raw) -replace '(?ms)spring.datasource.password=.*?$', 'spring.datasource.password=%DB_PASSWORD%' | Out-File -encoding ASCII '%CONFIG_PATH%'"
powershell -Command "(gc '%CONFIG_PATH%' -raw) -replace '(?ms)spring.datasource.url=jdbc:postgresql://localhost:5432/postgres', 'spring.datasource.url=jdbc:postgresql://localhost:%DB_PORT%/postgres' | Out-File -encoding ASCII '%CONFIG_PATH%'"

I'm using advancedinstaller to create an .exe installation file. I get this error message: "An error occured executing the Microsoft VC++ runtime installer." If I use the batch file directly it works OK and installs postgres.

1 Answer 1

2

Try to include the VC++ runtime installer as a prerequisite into your Advanced Installer Setup Project. Just check this in Prerequisites view of your setup project.

Seems like a missing dependency (VC++ runtime) of your setup package.

Sign up to request clarification or add additional context in comments.

2 Comments

Is it possible to do a quiet installation of the prerequisite?
Yes, this is possible, just configure a silent install command line in Prerequisites view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.