I had a situation recently where an application needed to be installed on all workstations (desktops and laptops) unless another application was installed. Traditionally I would use collections to accomplish this.
- create a collection “Deploy Mfg App vVersion – Exclusions” for the “exceptions / exclusions” and use a membership query of inventory data to populate the collection.
- create a collection “Deploy Mfg App vVersion – Targets” and exclude the collection “Deploy Mfg App vVersion – Exclusions” as a membership rule
- Ensure that the exclusion collection update schedule was about 5 minutes before the targets collection update cycle.
- Deploy to the “targets” collection.
However, I thought of trying a different approach and using the real-time Requirements feature of the Application model. Since this software was to be installed on any workstation unless a specific MSI application was already installed, I needed to create a custom requirement or Global Condition.
Windows / Setting / WQL query / String / root\CIMv2 / Win32_Product / IdentifyingNumber
Now add the MSI Product Code as a requirement, set the Operator to “Not equal to” and enter the MSI Product Code.
Using a Simulated Deployment, the before and after results clearly indicate that before the Requirement was added the product “Lync 2013 Basic Client” was Applicable and afterwards is is NotApplicable.