[ NOTE ] This guide assumes some basic experience with SCCM. If you are struggling with a step, please comment below.
The first step is to customize your K2Client.exe and K2Client-x64.exe installers using the k2clientconfig tool that is provided in the Sassafras K2 Client Deployment Guide. You will need to adjust the installer to be silent, disable automatic reboot, and specify the host name of your keyserver. Feel free to add any additional parameters that you think will be useful (e.g. hiding K2 Client from Add/Remove programs).
k2clientconfig -s 3 -h keyserver.example.org -b no K2Client.exe
k2clientconfig -s 3 -h keyserver.example.org -b no K2Client-x64.exe
set the user interface level displayed when the MSI installer is run
0: user can change settings, and choose components to be installed
1: user can choose components to be installed
2: user cannot make any changes to the install parameters
3: silent install (no interface is displayed and user cannot make changes)
KeyServer host name or IP address (default DNS name: keyserver)
reboot after install
yes: always prompt for a reboot after install
no: never reboot after install
auto: reboot if installer deems it necessary
When you add a new deployment to SCCM, it will need a "Content Location" (or network share with the files you want to distribute). An example might be "\\server1.example.org\SCCM\k2client". Once you have a Content Location in mind, add your modified K2Client.exe and K2Client-x64.exe files to this share. Create a new K2Install.cmd (script below) inside your Content Location. This will select the correct installer based on the architecture of the system.
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
K2Client-x64.exe -platform 64 -gpo
K2Client.exe -platform 32 -gpo
Navigate to Software Library -> Applications and "Create Application". You will need to "Manually specify the application information" and enter the name/publisher. From there, you will add a new "Deployment Type" (Script Installer) and point in to the Content Location you prepared in Step 2. The Detection Rules use the Registry to determine which version of K2 Client is installed. I am detecting for version "184.108.40.206 3129", but you will want to double-check what version you are installing. I have attached screenshots of what that looks like.
[ Content ]
Content Location: \\server1.example.org\SCCM\K2Client
Installation Program: cmd.exe /c "K2Install.cmd"
Deployment Options: Download content from distribution point and run locally
[ Detection Method ]
SOFTWARE\Sassafras\Install\KeyAccess\Version == "220.127.116.11 3129"
(OR) SOFTWARE\WOW6432Node\Sassafras\Install\KeyAccess\Version == "18.104.22.168 3129"
[ User Experience ]
Installation Behavior: Install for system
Logon Requirement: Whether or not a user is logged on
Congratulations, you're almost done! As usual with SCCM, you will want to deploy it to a "test" collection and see how it behaves. We were able to successfully upgrade clients from multiple different versions (6.2.x, 7.0.x, 7.1.x, 7.2.x, 7.3.x) but I would recommend adding workstations with different versions to your test collection just to be safe.
Good luck and happy scripting!