Installing Hotkey Features Integration using the ConfigMgr Application Model



This post is particularly interesting because most customers probably don’t notice there are more than one Hotkey Features Integration package that support a multitude of enterprise and consumer line ThinkPad’s across different OS’s.   

What can make this a bit challenging come deployment time, is if you have a variety of ThinkPad’s that don’t support the same Hotkey package.  Say you support ThinkPad T460p’s, P51’s  and X1 Yoga 1st Gen’s.  If you follow our recipe cards for these models, the link to the Hotkeys will direct you to the appropriate package to download.  You’ll also notice in the list of supported systems that both models are not present.  

Downloading each package, you’ll see two, almost identical package ID’s, except the last letter is a W and an E.  This is what distinguishes the package compatibility between the supported systems.   

In this guide, we will leverage the Application Model based installation along with Global Conditions.  This allows you to define specific requirements and offers more control in terms of detection logic before the client can install the application.

The first step is to create the Global Condition:

 In the ConfigMgr console, click Software Library.  In this workspace, expand Application Management and click Global Conditions.  On the Home Tab, click Create Global Condition.  For this scenario, we’re going to create a WQL query as the method to assess compliance.  To determine which ThinkPad will need the appropriate Hotkey package, we need to assess the value held in the Version property of the Win32_ComputerSystemProduct Class.  

Configure the condition like below and provide a name.  The WHERE clause is left blank because we will set that in the deployment type as its own requirement.


Create an Application for the Hotkeys
  • Under the Application Management workspace, click Applications and create a new Application.  Since this is an .exe, select the option to Manually specify the application information.  Provide a name and any other information you desire.  I will name this app Windows10-Hotkey Features Integration
  • Add a Deployment Type and choose Script Installer.  Provide a name, like 9.0.0.7-W and specify the content location for the version W source files.  Specify the installation command.  Referring back to the recipe cards, the command line will besetup.exe”  /s
Note: Hotkey packages for Windows 10 are provided as .inf’s, which are installed using setup.exe.  So they are no longer going to be shown in Programs/Features in the Control Panel.  Instead, it will be listed as another System Device in Device Manager named Fn and function keys.







  • For Detection Method, select the option to choose a custom script to detect the presence.  The   below detection script checks if version 9.2.0.1 is present on the system.

# Current version on support site
$currentVer = "9.2.0.1"

# version of Hotkeys installed on system
$hotkeyVer = Get-CimInstance Win32_PnpSignedDriver | ? { $_.DeviceName -eq 'Fn and function keys' } | Select-Object -ExpandProperty DriverVersion

if ($hotkeyVer) {
       if ($hotkeyVer.Trim() -eq $currentVer) {
              Write-Host "Current version installed"
       }
}
else {

}

For reference, there’s a table in the ConfigMgr documentation that shows how to use the output from a script to check whether an application is installed.  As future versions of the Hotkey packages are released, you can simply replace the version in the detection script to reflect what’s current. 




  • Set the installation behavior to Install for system, logon requirement to Whether or not a user is logged on.
  • Also under the User Experience, set Configuration Manager client will force a mandatory device restart.  
  • On the installation requirements page, this is where the Global Condition that was created earlier will come into play.  Click the Add… button and configure as shown below:


  • The values entered here are what’s retrieved from the Version property in the Win32_ComputerSystemProduct Class.  They are also noted in the recipe cards in the Model Queries section.  Since this Hotkey package supports Windows 10 64-bit, I also added a second requirement for Operating System version:
  • Complete the remainder of the wizard and repeat the steps above for a second Deployment type for the [E] version of the Hotkey package if you have systems that fall under the list of supported systems for that version.
----
In case you're also supporting Windows 7 in your environment and want to add a third Deployment Type, the process described above will essentially be the same except for the detection method.  You will also want to set the OS requirement to all versions of Windows 7

Instead of using a script for detection, you can use the Registry Setting Type configured like below:

The Windows 7 Hotkey package will write the version to the Registry in the Key above.



Here are screenshots of the “Requirements Not Met” tab to compare the Deployment Status for each Deployment Type.






Further reading:
Tracking Application Model Installs: 

Create Global Conditions: