Unattended installation of software

Advertisements
f1b9b0cfa8dd44ca9bc746c266af30af Unattended installation of software 2

Unattended software installation is standard in many environments. But how does it work? With an MSI it’s easy, but not everything is available as an MSI package. But many applications bring their own methods. Since I often need this, here is a small collection for the more important programs.

It doesn’t matter if this is used for MDT, SCCM, Intune or script-based software installation. In my case, I picked it out for my MDT test and set it up there.

My advice

When you build the software for automatic installation, you create a wrapper. This is a CMD file that contains the command to be executed. Then you can test the installation routine more easily, and “recycle” it elsewhere if necessary, for example on systems that are not installed with the MDT. Other useful wrappers could be an Update.cmd or an uninstall.cmd.

Microsoft applications

Local Administrator Password Service (LAPS)

Instructions for setting up LAPS can be found here. Since LAPS is available as MSI package, it is very simple:

msiexec /i LAPS.x64.msi /quiet

Other parameters are not needed because Microsoft has made a good selection of default values.

Microsoft Office 2019 ProPlus / Microsoft Office 2016 (Klick-to-run) / Office 365 ProPlus (klick-to-run) / Microsoft Project 2019 / Microsoft Visio 2019

With Microsoft Office with click-to-run, it gets a bit more complex. Often the question comes up, does it have to be the click-to-run? It depends, Office 2019 and Office365 are no longer available as an MSI package. Installation only takes place via click-to-run and the Office deployment tools. Here we need several things for the installation:

  • A file share to provide the data
  • A configuration file
  • An installation wrapper
  • An update wrapper to update the share

If you haven’t worked with the Office deployment tool (ODT) yet, I recommend a look at the documentation at Docs.Microsoft.com. A tip for creating the XML file, you can easily click it together on Config.Office.com. A wizard will guide you through all click-to-run compatible Office products.

I define the share with the installation files in the XML share as UNC path.

The installation wrapper is quite short, to avoid problems with accesses and network links in different user contexts, I copy the required files to C:\Temp and run them there.

@echo off
cd %~dp0
Robocopy . c:\Temp setup.exe *.xml /R:2 /w:10
c:
cd \temp
setup.exe /configure Office2019ProPlus.xml

The wrapper for maintaining the installation share is also simple:

setup.exe /download Office2019ProPlus.xml

Which Office product will be installed in which edition is all in the XML file.

Advertisements

Microsoft Visual Studio

Even if there is a small extension for the MDT, they can also be installed easily Unattended. Just add the parameter “/q”. My wrapper will look like this:

Source\VS2010\vcredist_x64.exe /q
Source\VS2010\vcredist_x86.exe /q
Source\VS2012\vcredist_x64.exe /q
Source\VS2012\vcredist_x86.exe /q
Source\VS2013\vcredist_x64.exe /q
Source\VS2013\vcredist_x86.exe /q
Source\VS2017\vc_redist.x64.exe /q
Source\VS2017\vc_redist.x86.exe /q

Microsoft Azure Log Analytics – Upgrade Readiness

I often work with Log Analytics from the Azure. Since Upgrade Readiness requires additional information that a script collects, I built a wrapper for packaging. In this example, the deployment script is distributed. The documentation and the script can be found at Docs.Microsoft.com. It is important to adjust the “RunConfig.bat” beforehand. In my example, the script is started as a scheduled task on Mondays and Wednesdays, as well as directly after the installation. The Install.cmd wrapper is:

cd %~dp0
Robocopy . C:\Programme\ALA-UggradeReadiness *.* /R:2 /w:10
Schtasks /create /RU "SYSTEM" /SC WEEKLY /d MO,MI /TN "Log Analytics UR" /TR C:\Programme\ALA-UggradeReadiness\RunConfig.bat /ST 08:00 /ET 18:00
Schtasks /run /TN "Log Analytics UR"

Microsoft Azure Log Analytics Agent

If you want to use other solutions from the field of log analytics, you may not be able to avoid the agent. First, the file MMASetup-AMD64.exe has to be unpacked. The wrapper is relatively simple, only the WorkspaceID and WorkspaceKey have to be used.

msiexec /i MOMAgent.msi /t MOMAgent.DEU.mst ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_ID=Meine-Eigener-Workspace-ID OPINSIGHTS_WORKSPACE_KEY="Mein Geheimer Workspace Key " AcceptEndUserLicenseAgreement=1 /q

Useful Programs

Adobe Acrobat Reader

To distribute Acrobat Reader, you need an additional license agreement with Adobe. I distribute Adobe Acrobat Reader for businesses. If you are looking for more information, I recommend a look at the administrators manual. It also describes how the “CustomWizzard” works to customize the installation. Extract the files from the installer. Customize the MST file with the Custom Wizzard. The wrapper is then very simple:

msiexec /i AcroRead.msi /T AcroRead.mst /q
msiexec /u AcroRdrDCUpd1901020098.msp /T AcroRead.mst /q

Google Chrome

Google has also been making its browser available to companies for some time. Especially worth mentioning is that Chrome can be controlled by group policies for a long time. The Chrome Enterprise Browser can be downloaded from the website. The zip file contains an MSI package, the GPO templates and the documentation.

Advertisements

The installation of the package is then relatively simple:

msiexec /i GoogleChromeStandaloneEnterprise64.msi /q

Synology Active Backup for Business Agent

If you have a Synology NAS, you can also use it as a backup system. This must be configured on the NAS beforehand. After installation, appropriate configurations must also be made in the software. The software is available from Synology as an MSI package. So it becomes simple again:

msiexec /i "Synology Active Backup for Business Agent-2.0.3-0472-x64.msi" /q

OpenSource Software

7zip.org

A very good OpenSource packer. It is already available as MSI for download. The wrapper is simple:

msiexec /i 7z1900-x64.msi /q

Mozilla Firefox

Also, Mozilla has an area for business. The full installer can be easily controlled via parameters. The instructions can be found here. Here is my example wrapper:

Firefox_Setup_65.0.2.exe /s /TaskbarShortcut=false /DesktopShortcut=false /MaintenanceService=true

GPG4Win

An OpenSource PGP implementation that also works with Microsoft Office. The software is available as an exe-installer, the company that maintains it asks for donations. This can be controlled via parameters and an INI file. Details can be found in the documentation. My wrapper is accordingly simple:

gpg4win-3.1.5.exe /S /C=gpg4win.ini

Notepad++

A good OpenSource editor I like to use. The installer has a simple silent option built-in. I would like to warn you about some websites that offer older versions as MSI packages. Nobody knows exactly what was adjusted before the MSI was created. Also, these versions are partly very old.

Here’s my “complicated” wrapper:

npp.7.6.3.Installer.x64.exe /S

FileZilla

Even the good FileZilla FTP client can be installed unattended. My example for the installation which is available to all users:

FileZilla_3.41.1_win64-setup.exe /S /user=all

Anything missing?

What are your favourites, or what else should I record? Just leave a comment.

Note about program and Power Shell Code

The code contained here serves as an example. I do not assume any warranty, guarantee or support for the code or its components. Use the code at your own risk.

I always recommend to have a close look at the scripts before using them.

This article first appeared on Infrastrukturhelden.de in German.

This article is a translation of the Infrastrukturhelden.de article “Unbeaufsichtigte Installation von Software” from March 12, 2019. Links may refer to other Infrastrukturhelden.de articles, these may also be available in English language.

Also it can be, that I still use screenshots of German systems. However, where it is possible for me with little effort, I insert screenshots of English systems.

1 thought on “Unattended installation of software”

Comments are closed.