Failed to Apply UR2 to SCSM 2012 SP1 - Performance Counters not found

I've been updating a couple of SCSM2012 SP1 installations to UR2 and everytime time I run into the same problem - the installation fails.

The installations fails with:  error occured while executing custom action: "_Installhealthserviceperfcountersforpatching"

Looking at the SCSM2012_CU_KB2802159_AMD64_7.5.2905.125.msp.0.log I can see the following errors:

InstallCounters: LoadPerfCounterTextStrings() failed . Error Code: 0x80070002. momv3 "D:\Microsoft System Center 2012\Service Manager\MOMConnectorCounters.ini"
InstallPerfCountersHelper: pcCounterInstaller->InstallCounters() for the default counters failed. Error Code: 0x80070002. MOMConnector
InstallPerfCountersLib: InstallHealthServicePerfCounters() failed . Error Code: 0x80070002.
InstallPerfCountersLib: Retry Count : .
InstallHSPerfCounters: Failed to install agent perf counters. Error Code: 0x80070002.
The arguments are: -2147024894, The system cannot find the file specified.,

It turns out that the environments were missing a registry entry for the MOMConnector Performance counters and this caused the error. The key missing is: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MOMConnector

I created the reg entry (found on a SCSM DW MS) and reran the installation of UR2 with success. The reg-file to created the entry is added to this post. Before importing the Reg-File, make sure the path of where SCSM is installed is correct, if not change this linie in the reg-file:   ""Library"="C:\\Program Files\\Microsoft System Center 2012\\Service Manager\MOMConnectorPerformance.dll" and then do the import.

You may also need to copy the DLLs and biniaries to the folder, for different reasons I will not be sharing these on the this blog.

Note: After the failed installation of the update, all the workflows stopped running and as soon as the updated completed successfully, they started to be processed again.

MOMConnector.zip