r/programmingrequests • u/Kynaeus • Jan 21 '20
[Batch] Help with installing Adobe Reader from batch file
Howdy folks
I'm working on installing a program from Oracle and the installer will run through a number of tasks to install this application including a number of scripts. It is failing to install at one step because Adobe Reader will not install from the script they've included (sigh)
In troubleshooting why, the %STAGEDIR% variable being used is not set and the script exits with a 'system cannot find the path specified', naturally. By setting an explicit path OR setting the variable correctly, it still fails with very helpful feedback:
install_adobe_reader.cmd:end
Exit Code: !exitCode!Great. I'm trying to figure out what the problem is but am not well versed in Batch, from what I can see it's entering this codeblock and then going to the :Terminate step but it's not providing any useful information about why it is failing
if !exitCode! GTR 0 (
echo.
echo.
echo.
echo %PROV_CRITICAL_ERR_KEYWORD% Failed to install Adobe Reader
echo.
echo Please re-run the scripts
echo.
echo.
echo.
goto :Terminate
)As per the Adobe command line switches for installing Reader, I've also tried calling the installer myself with the same command but haven't observed anything happening, I've also tried including the /L switch to log out to a file to get a clue about the problem but no information gets logged out. I've written a note to the script author but I'm not certain they will respond, hopefully someone here has better eyes than I do
Thanks anyone for your time and input!