Speed up GPO software install

Software distribution using GPO’s can be a good way to install msi packages, but can delay the startup process, especially if the package is large and the network is slow. By using a simple trick, we can speed up this process significantly.

The concept is to copy the installation files in the background to a local drive without bothering the user. A GPO is configured to install the package from a local drive path. The users will not notice the copy process, so there’s no problem if this takes some time to finish. The setup however is much faster.

The following example shows how to do it.

1. Copy installation files to local disk

Create a script that copies the source files to a folder on the local disk.

Robocopy \\DC01\Install$ C:\Install /mir /sec /r:1 /w:1 /ipg:25

This example script synchronizes a folder on the network to a local folder using limited bandwidth (more information in Copy files on slow links) and preserving file permissions.

I saved the script as cmd file \\DC01\Install$\InstallSync.cmd.

2. Schedule the script

To run the script in the background, I create a GPO that defines a scheduled task to run at computer’s startup.

Open a GPO and create a new scheduled task in the section

Computer Configuration\Preferences\Control Panel Settings\Scheduled Tasks

Enter the account information and other general settings.

Define the scheduled task to run at startup. To lower the impact on the startup process, I delay the task by 30 minutes.

Add a new action to run the synchronization script.

3. Install the software by GPO

Assign the package the usual way, but select an msi file on the local disk as the source. To do so, you must already have copied the package to your local disk.

Create a GPO and go to section

Computer Configuration/Policies/Software Settings/Software Installation

Assign the software to the computer and close GPO editor. The warning can be ignored.

4. The result

After booting a PC that is affected by the GPO, the setup files will be copied to the local disk in the background. The software install will fail initially because the sourcefiles can not be found, but the user will not notice this. The first time the computer is started after the setup source files are copied, the software will be installed.