ArcGIS Pro silent install script

Document created by curtvprice Champion on Nov 2, 2016Last modified by curtvprice Champion on Jun 29, 2019
Version 10Show Document
  • View in full screen mode

This is in good old DOS batch language. It is still working as of Pro 2.4, thank you, Esri install team!

 

So far, pro updates don't require an uninstall, so you can just rerun it with a new version. (Exception: if you have a beta or pre-release version of Pro installed, you should uninstall it before installing the final to make sure you get a nice clean installation.) This script could be used to create an SCCM package for automated deployment to many desktops.

 

References: 

Install options—ArcGIS Pro | ArcGIS Desktop (Install ArcGIS Pro silently using command line parameters) 

Enterprise Deployment Resources

Test your machine to make sure it is ready for ArcGIS Pro:  Can You Run It? 

 

:: install_arcgispro.bat
:: Silent install of ArcGIS Pro
::
:: INSTRUCTIONS:
:: 1) Edit this script as instructed below in the comments
:: 2) Save with ".bat" extension
:: 3) Open an administrative command window.
:: 4) Run this install script from the command line
::    Alternatively, deployment software can be used to run the script.
::
:: Required files, this script assumes the script is in the same
:: folder as the "Esri" folder below:
::
:: install_arcgispro.bat
:: \---Esri
::     +--ArcGISPro
::          ArcGISPro.cab
::          ArcGISPro.msi
::          *.msp files (if any - for example 1.4.1 patch to 1.4)
::     +--ArcGISProHelp
::          ArcGISProHelp.cab
::          ArcGISProHelp.msi     
::
::
:: Author: Curtis Price, cprice@usgs.gov
::
:: History:
:: 01/30/2015 ArcGIS Pro 1.0 - Initial release
:: 08/19/2015 Added .NET 4.5 check
:: 11/02/2016 Update for Pro 1.3 / 1.3.1
:: 06/07/2017 Setup to apply any .msp files in Pro .msi folder
:: 03/18/2018 Added CHECKFORUPDATESATSTARTUP to install command
:: 07/21/2018 Fix (missing variables)
::----------------------------------------------------------------
:: This software is provisional and subject to revision; it has
:: not been thoroughly reviewed or received USGS final approval.
:: Users are cautioned to consider carefully the provisional
:: nature of the code before using it for decisions that concern
:: personal or public safety or the conduct of business that
:: involves substantial monetary or operational consequences.
@echo off

:: keep variables local to this script
setlocal

:: %~d0%~p0 is folder where this script resides
set SRC=%~d0%~p0
set LOGDIR=%TEMP%
set INSTALLDIR=C:\Program Files\ArcGIS\Pro
:: set to 1 to suppress Pro prompting software updates
:: (useful for managed deployments)
set CHECKUPDATES=0

:: ====================================================================
::                PLEASE DO NOT EDIT BELOW THIS LINE
:: ====================================================================

set MSIEXEC=%WINDIR%\system32\msiexec.exe

:: Check for .NET 4.6.1 x64
set x64key=HKLM\SOFTWARE\Microsoft\.NETFramework
:: 4.6.1 x64
%WINDIR%\system32\reg.exe query %x64key%  /f ".NETFramework,Version=v4.6.1" /k /s >NUL ^
  || ( echo. & echo ** Microsoft .NET Framework 4.6.1 ^(x64^) not installed! ** & goto dotnet_fail) 
echo Microsoft .NET Framework 4.6.1 ^(x64^) verified
goto dotnet_ok
:dotnet_fail
echo ** .NET Check Failed -- Cannot Install ArcGIS Pro **
goto :eof
:dotnet_ok
echo ** .NET Check Passed **

echo.
net session >nul 2>&1
if %errorLevel% == 0 (
  echo Administrative permissions confirmed.
) else (
  echo Current permissions inadequate
  echo ArcGIS Pro install failed
  goto :eof
)


:: Set log file path, prefix at install script runtime
:: Example LOG_PATH result: "%LOGDIR%\ArcGISPro_20120925_1623"
:: (%LOGDIR% is set above)

set DATESTAMP=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
set TIMESTAMP=%TIME:~,2%%TIME:~3,2%
set TIMESTAMP=%TIMESTAMP: =0%
set LOG_PATH=%LOGDIR%\ArcGISPro_%DATESTAMP%_%TIMESTAMP%
set SILENT=/qb- /passive /norestart

:: Installation starts here

@echo on

:: Install ArcGIS Pro for all users of this computer
%MSIEXEC% /i "%SRC%\Esri\ArcGISPro\ArcGISPro.msi" ^
ALLUSERS=1 INSTALLDIR="%INSTALLDIR%" ^
CHECKFORUPDATESATSTARTUP=%CHECKUPDATES% ^
/l+ie "%LOG_PATH%_Pro.txt" /l+ie "%LOG_PATH%.txt"  %SILENT%

:: patch updates (.msp files (if any) should be placed in folder with ArcGIS Pro msi
pushd "%SRC%\Esri\ArcGISPro"
for %%p in (*.msp) do %MSIEXEC% /p %%p REINSTALLMODE=omus %SILENT%
popd

:: ArcGIS Pro Help (optional) (Delete or comment out to only use web help)
%MSIEXEC% /i "%SRC%\Esri\ArcGISProHelp\ArcGISProHelp.msi" ^
  ALLUSERS=1 ^
  /l+ie "%LOG_PATH%_Help.txt" %SILENT%
7 people found this helpful

Attachments

    Outcomes