code: def _CheckInstallSuccess(self):
      
      if not os.path.exists(self.install_path):
        raise RuntimeError("Install failed, no files at: %s" % self.install_path)
  
      try:
        output = subprocess.check_output(["sc", "query", self.service_name])
        service_running = "RUNNING" in output
      except subprocess.CalledProcessError as e:
        if e.returncode == 1060:
          # 1060 means: The specified service does not exist as an installed
          # service.
          service_running = False
        else:
          raise
  
      if self.expect_service_running:
        if not service_running:
          raise RuntimeError(
              "GRR service not running after install, sc query output: %s" %
              output)
      else:
        if service_running:
          raise RuntimeError(
              "GRR service running after install with expect_service_running == "
              "False, sc query output: %s" % output)
docs: Checks if the installer installed correctly.