Advertisement
Guest User

Install_adobe_reader

a guest
Jan 21st, 2020
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.26 KB | None | 0 0
  1. echo OFF
  2. rem %PROV_INSTALL_ON_DRIVE%
  3.  
  4. set STAGE_DIR=D:\Downloads\appmedia\scripts\core\stage
  5. echo %DATE%
  6. time /t
  7.  
  8. set exitCode=0
  9. echo install_adobe_reader.cmd:start
  10.  
  11. if exist "%SYSTEMDRIVE%\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" (
  12.     echo.
  13.     echo.
  14.     echo.
  15.     echo Adobe Reader already exists
  16.     echo.
  17.     echo.
  18.     echo.
  19.     echo Adobe Reader will be reinstalled
  20. )
  21.  
  22. echo(
  23. echo(
  24. echo(
  25. echo(
  26. echo Installing Adobe Reader
  27. echo(
  28. echo Kindly wait ...
  29. echo(
  30. echo(
  31. echo(
  32. echo(
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. cd "%STAGE_DIR%\AdobeReader"
  40.  
  41. call "%STAGE_DIR%\AdobeReader\AcroRdrDC1901220034_en_US.exe" /qn EULA_ACCEPT=YES AgreeToLicense=Yes RebootYesNo=No /sAll
  42. set exitCode=%errorlevel%
  43.  
  44. :: Exit Code 3010 is ERROR_SUCCESS_REBOOT_REQUIRED
  45. :: will ignore exit code 3010
  46. if !exitCode! == 3010 (
  47.     echo Original exit code was 3010 ERROR_SUCCESS_REBOOT_REQUIRED
  48.     echo Will ignore exit code 3010, and exit with code 0 instead
  49.     set exitCode=0
  50. )
  51.  
  52. if !exitCode! GTR 0  (
  53.     echo.
  54.     echo.
  55.     echo.
  56.     echo %PROV_CRITICAL_ERR_KEYWORD% Failed to install Adobe Reader
  57.     echo.
  58.     echo Please re-run the scripts
  59.     echo.
  60.     echo.
  61.     echo.
  62.     goto :Terminate
  63. )
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. :Terminate
  73. cd "%~dp0"
  74. echo install_adobe_reader.cmd:end
  75. echo Exit Code: !exitCode!
  76. exit /B !exitCode!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement