Windows Installer Patch Cache



-->

If this per-machine system policy is set to a value greater than 0, Windows Installer saves older versions of files in a cache when a patch is applied to an application. Caching can increase the performance of future installations that otherwise need to obtain the old files from a original application source.

The value of the MaxPatchCacheSize policy is the maximum percentage of disk space that the installer can use for the cache of old files. For example, a value of 20 specifies no more than 20% be used. If the total size of the cache reaches the specified percentage of disk space, no additional files are saved to the cache. The policy does not affect files that have already been saved.

If the value of the MaxPatchCacheSize policy is set to 0, no additional files are saved.

Windows Installer Patch Cache Google Chrome

If the MaxPatchCacheSize policy is not set, the default value is 10 and a maximum of 10% of the disk space can be used to save old files.

Baseline cache for patching and patch removal Windows Installer 3.0 added support to uninstall patches and to provide a more robust experience for applying binary deltas to existing files without accounting for every possible state an existing file could be in. If in doubt, you can always go safer way: simply compress entire Installer map! Right click on the Installer map (or just $PatchCache$ map) and choose Properties. On General tab, click Advanced button. Finally, check Compress folders to save disk space. It's not clear (at least to me) that one can enter a number (an Integer) where the default NTLite field says 'Default.' From the note at the bottom of the window there is a hint that one can put in a 'numerical value' in the field, and so, years ago, I stumbled into this fact.

Registry Key

HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsInstaller

Data Type

REG_DWORD

Related topics

When ‘cached mode’ is enabled, the computer that is running BatchPatch will download updates for all target computers directly to its local cache directory. Target computers will not individually download their own updates from Microsoft or a WSUS. Instead BatchPatch will distribute updates to target computers from its cache. The advantage of ‘cached mode’ in this case is that it can save internet bandwidth if updates are being downloaded from Microsoft’s public server. The reason for the bandwidth savings is because BatchPatch will download only one copy of each update, which it can then distribute infinitely to target computers, rather than needing every single target computer to download its own copy of each available update.

‘Cached mode’ can also be used in conjunction with ‘offline mode’, which enables an administrator to apply Windows Updates to computers that don’t have internet access or access to a managed update server such as WSUS. For more on ‘cached mode’ and ‘offline mode’ usage, please see: Cached Mode and Offline Updates

Cache

This tutorial demonstrates how to use BatchPatch in ‘cached mode’ to download and install updates on multiple computers. In this example all computers are required to have internet access. The computer that runs BatchPatch will instruct all target computers to perform an online search for updates. The list of available updates from each target computer is transferred back to the BatchPatch computer, and then BatchPatch downloads a single copy of all available updates to its local repository. After it downloads the updates, it copies them to the target computers and initiates the installation process.

Windows Installer Package

  1. Enable cached mode. Go to Tools > Settings > Windows Update, and then check the box to enable cached mode. Also set the Local update cache directory to a folder on your computer that has enough free space to store numerous Windows Update files. The amount of space required completely depends on how many updates need to be applied to target computers, the size of each update, the number of different operating systems you are deploying to, and whether or not you choose to retain cached files after they have been distributed to target computers. When cached mode has been enabled, an indicator is placed in the upper-right corner of the BatchPatch window.
  2. In the same Tools > Settings > Windows Update window, also take note of the Server Selection option. When cached mode is enabled but offline mode is disabled, target hosts will perform an online search for updates against the selected server. The target hosts will then report back to BatchPatch with their lists of available updates. BatchPatch will then download the updates from the same location that is configured in the Server Selection setting.
  3. Add hosts to the BatchPatch grid using File > Add hosts…
  4. Highlight the host(s) and select the desired action. For the sake of this example let’s assume we want to download and install updates and then reboot the target if a reboot is required to complete the updates installation. So, we select Actions > Windows Updates > Download and install updates + reboot if required
  5. I have included a series of screenshots below to show the whole process. Upon completion we have the overall content logged to the ‘All Messages’ column, with detailed information in the ‘Local Agent’ and ‘Remote Agent’ logs. In this case the local agent was responsible for downloading updates to the cache directory and then copying the updates to the target machine. The remote agent was responsible for moving the updates into the Windows Update cache and then installing the updates on the target host. In the final screenshot below we can see the ‘All Messages’ log content. I have not included screenshots of the other local or remote agent logs simply because they are too large to view in a meaningful way within a small screenshot.