This issue started happening again and I investigated further. It turns out to have a simple cause. The error occurs when the files CptControl.exe and CptInstall.exe are missing from the bin directory. Our automated builds were excluding .exe files from the sdk directory, so my local builds worked and the automated builds would get an error when starting sharing.