ArcGIS Desktop (ArcMap) silent install script

9914
2
10-03-2014 11:19 PM

ArcGIS Desktop (ArcMap) silent install script

Here's an example install script, in good old DOS batch language. This could probably be easily tweaked to run in PowerShell if you're into that.

This script works with 10.2.x or later (edit for the version you are installing)

For more information about how silent installs work, msiexec options, etc., see the deployment guides referenced in Enterprise Deployment Resources

:: install_arcmap.bat

@echo off

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

setlocal

:: Source media folder
:: This folder expected to contain:
::  Desktop\SetupFiles
::  BackgroundGP\SetupFiles
::  DataInterop\SetupFiles
set src=G:\Installs\ArcGIS_107

:: Set the value below to major version
set ARCVER=10.7

:: Install folder (must be a "letter-drive" path)
:: default is C:\Program Files(x86), etc., C:\ArcGIS is easier to manage
set INSTALLPATH=C:\ArcGIS
set INSTALLDRIVE=C:

:: Set log file path, prefix at install script runtime
:: Example logfile name: "ArcInstall_20120925_1623_Desktop.txt"
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=%TEMP%\ArcInstall_%DATESTAMP%_%TIMESTAMP%

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

@echo on
:: Install ArcGIS Desktop 
:: Using setup.exe instead of setup.msi updates C++ libraries if needed
pushd "%SRC%\Desktop"
setup.exe ROOTDRIVE=%INSTALLDRIVE% ^
 INSTALLDIR="%INSTALLPATH%" INSTALLDIR1="%INSTALLDRIVE%\Python27" ADDLOCAL=ALL ^
 SOFTWARE_CLASS=Professional SEAT_PREFERENCE=Fixed DESKTOP_CONFIG=TRUE ^
 ESRI_LICENSE_HOST=27000@xx.xx.net" ^
 /l+ie "%LOG_PATH%_Desktop.txt" /passive /norestart
popd

:: Verify ArcGIS Desktop install - stop install if test fails
@echo off
if defined ProgramFiles(x86) ( set k=HKLM\SOFTWARE\Wow6432Node\ESRI\Desktop%ARCVER% ) ^
  else ( set k=HKLM\SOFTWARE\ESRI\Desktop%ARCVER% )
:: if reg query produces an error, ArcGIS was not installed
%REG% query %k% /v InstallDir >>"%LOG_PATH%_Desktop.txt" 2>&1 || ^
  (echo. & echo ** ArcGIS Desktop install failed ** &  ^
    echo Check file paths in script "%0" and &  ^
    echo log file "%LOG_PATH%_Desktop.txt" & goto :eof  )
@echo on

:: Desktop 64-bit background geoprocessing (optional - Windows x64 only)
if defined ProgramFiles(x86) ^
 %MSIEXEC% /i "%SRC%\BackgroundGP\SetupFiles\Setup.msi" ^
 ROOTDRIVE=%INSTALLDRIVE% INSTALLDIR=%INSTALLDRIVE%\Python27 ^
 /l+ie "%LOG_PATH%_DesktopBackgroundGP.txt" /qb- /passive /norestart

:: Data Interoperability extension (optional)
%MSIEXEC% /i "%SRC%\DataInterop\SetupFiles\Setup.msi"     ^
 INSTALLDIR="%INSTALLPATH%\Data Interoperability Extension" ^
 /l+ie "%LOG_PATH%_DataInterop.txt" ^
 /qb- /passive /norestart‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

 

Comments

excellent.

Where would one put there Single-Use authorization code in your script? the one that starts with  ESU########?

Version history
Last update:
‎04-05-2021 03:58 PM
Updated by:
Contributors