That error could popup if the tsclient.exe component (or one of its libraries) is missing (or fails to run properly).
If a reinstall fixes it temporarily, then it could be that:
* the location where the client is being installed is a temporary location that is being cleaned up, or
* there is a conflict with some other software (e.g. some security solution removing/quarantining it in error)