CB-4533 return error code 2 on fail, CB-5359 get tools version from the registry