Synchronize with Programs And Features (Licensed Editions Only)

Chocolatey maintains its own state of the world, while Windows maintains the state of Programs and Features. If an application is upgraded or uninstalled outside of Chocolatey, such as is the case with Google Chrome and its auto updating utility, Chocolatey doesn't know about the change. The synchronize feature keeps Chocolatey's state in sync with Programs and Features, removing possible system-installed state drift.


Automatic Synchronize

In licensed editions of Chocolatey, synchronize for installed packages that are tracking to software installed in Programs and Features happens automatically and takes effect prior to the command running.

When you install a package, many times that package will install software into Programs and Features. If someone were to manually remove the software, upgrade it, or it automatically upgrades, automatic sync will ensure the package stays in sync with those changes happening outside of Chocolatey. This is one place where commercial editions have better system integration.

Usage

Synchronize - if you are on https://chocolatey.org/docs/features-synchronize, see commented html below for detailed description of image

In the image above, someone manually removed the 1Password software. On the next run of Chocolatey, auto sync sees the software has been removed, so it removes the package tracking to that software in response to those system changes.

See It In Action

auto package creation/synchronize

Options and Switches

There are none - automatic sync just happens every run.

FAQ

How do I take advantage of this feature?

You must have a licensed edition of Chocolatey (Pro, MSP, or Business). Pro is a personal, named license that costs about the price of a lunch outing per month and comes with several other features. Business editions are great for organizations that need to manage the total software management lifecycle. MSP editions contain a subset of the Business edition features.

I'm a licensed customer, now what?

It just works.

How does it work?

Chocolatey tracks applications that it installs, so it is able to keep up with those applications as they are upgraded and uninstalled, even outside of Chocolatey.

Sync Command

Starting in 1.9.0 of the licensed extension, sync has been added as a preview feature for organizations to try out. Currently Business edition only, but expected to be in Pro+ in Q3 2017.

Sync looks at all software that is in Programs and Features that is not being managed with Chocolatey packages and brings them under management. This means you can run one command and suddenly, all of the software installed on a machine is under management by Chocolatey!

Usage

To synchronize your system, Simply call choco sync and Chocolatey will ensure that all software in Programs and Features comes under Chocolatey management and provides you the packages/package sources so you can add them to source control for managing those packages over time.

Setup

At 1.9.0, sync is in preview. You need to turn it on by enabling the feature allowPreviewFeatures:

See it in action

We've prepared a short video to show sync in action:
Chocolatey's Package Synchronizer - Sync Command

In the following image, sync is run on a system that has 18 applications installed and a base Chocolatey for Business install. Note after running sync, all software on the machine is now being managed by Chocolatey.

Chocolatey's Package Synchronizer Sync Command - if you are on https://chocolatey.org/docs/features-synchronize, see commented html below for detailed description of image

Options and Switches

The following are available in the choco sync command.

     --id=VALUE
     Id - The Display Name from Programs and Features

     --out, --outdir, --outputdirectory, --output-directory=VALUE
     OutputDirectory - Specifies the directory for the generated Chocolatey
       package file(s). If not specified, uses a subdirectory of the current
       directory.

FAQ

How do I take advantage of this feature?

You must have the business edition of Chocolatey. Business editions are great for organizations that need to manage the total software management lifecycle.

I'm a business customer, now what?

You would periodically run choco sync.

How does it work?

Chocolatey takes a look at all software in Programs and Features that is not under Chocolatey management, generates packages on the fly and baselines them under the Chocolatey install, ensuring all of the links are tracked.

Do I get the packages to add to source?

Yes! Chocolatey will tell you the location of the sync files so you can put them into source control.

Some packages have a TODO list

Generating packages on the fly from Programs and Features for non-MSI installers doesn't provide everything necessary to ensure an actual install. So when you take those packages back to source, you will need to finish out the packaging for those so that later when you upgrade, things will work appropriately.

How do I get machine parseable output?

Use -r. choco sync -r. Requires Chocolatey v0.10.4+.

What if I have an existing package that is just not tracking to Programs and Features?

Synchronize can recognize existing packages and sync to those as long as the name of the package is a close match to the software name (e.g.  Google Chrome becomes either google-chrome or googlechrome).

Sync Command Known issues

All Packages in Programs and Features

In C4B, you can flip a switch and see all packages in Programs and Features, even those packages that don't have underlying native installers! This makes reporting back to legacy inventory reporting systems a snap.

Usage

All Packages in Programs And Features - if you are on https://chocolatey.org/docs/features-synchronize, see commented html below for detailed description of image

Requirements

Setup

Options and Switches

Global Feature Setting:

FAQ

How do I take advantage of this feature?

You must have the business edition of Chocolatey. Business editions are great for organizations that need to manage the total software management lifecycle.

I'm a business customer, now what?

Once you set the feature, it just works automatically.

How does it work?

Chocolatey tracks packages that manage natively installed software. For packages that are zip archives or configuration, Chocolatey will add an entry into Programs and Features based on the nuspec. It's smart enough not to add an entry for a meta-package - say notepadplusplus and notepadplusplus.install are installed. The meta-package would be notepadpluplus.

Packages in Programs and Features Known Issues