chrome/updater/test/service/win/updater_test_service_control.py
def InstallService():
  """Install updater test service.

  If the service was previously installed, it will be updated.

  Returns:
    True if the service is installed successfully.
  """
  _SetupEnvironmentForVPython()

  service_main = _MainServiceScriptPath()
  if not service_main:
    logging.error('Cannot find the service main script [%s].', service_main)
    return False

  try:
    if _IsServiceInStatus(win32service.SERVICE_RUNNING) and not StopService():
      logging.error('Cannot stop existing test service.')
      return False

    logging.info('Installing service with script: %s', service_main)
    command = [
        sys.executable, service_main, '--interactive', '--startup', 'auto',
        'install'
    ]
    if _RunCommand(command):
      logging.info('Service [%s] installed.', _UPDATER_TEST_SERVICE_NAME)
      return True
    else:
      logging.error('Failed to install [%s].', _UPDATER_TEST_SERVICE_NAME)
      return False
  except _ServiceErrors as err:
    logging.exception(err)
    return False
Install updater test service.

  If the service was previously installed, it will be updated.

  Returns:
    True if the service is installed successfully.
  
Install updater test service.
If the service was previously installed, it will be updated.
Install updater test service . If the service was previously installed it will be updated .
def InstallService():
  _SetupEnvironmentForVPython()
  service_main = _MainServiceScriptPath()
  if not service_main:
    logging.error('Cannot find the service main script [%s].', service_main)
    return False
  try:
    if _IsServiceInStatus(win32service.SERVICE_RUNNING) and not StopService():
      logging.error('Cannot stop existing test service.')
      return False
    logging.info('Installing service with script: %s', service_main)
    command = [
        sys.executable, service_main, '--interactive', '--startup', 'auto',
        'install'
    ]
    if _RunCommand(command):
      logging.info('Service [%s] installed.', _UPDATER_TEST_SERVICE_NAME)
      return True
    else:
      logging.error('Failed to install [%s].', _UPDATER_TEST_SERVICE_NAME)
      return False
  except _ServiceErrors as err:
    logging.exception(err)
    return False
def InstallService ( ) : _SetupEnvironmentForVPython ( ) service_main = _MainServiceScriptPath ( ) if not service_main : logging . error ( 'Cannot find the service main script [%s].' , service_main ) return False try : if _IsServiceInStatus ( win32service . SERVICE_RUNNING ) and not StopService ( ) : logging . error ( 'Cannot stop existing test service.' ) return False logging . info ( 'Installing service with script: %s' , service_main ) command = [ sys . executable , service_main , '--interactive' , '--startup' , 'auto' , 'install' ] if _RunCommand ( command ) : logging . info ( 'Service [%s] installed.' , _UPDATER_TEST_SERVICE_NAME ) return True else : logging . error ( 'Failed to install [%s].' , _UPDATER_TEST_SERVICE_NAME ) return False except _ServiceErrors as err : logging . exception ( err ) return False
Install updater test service.
Install updater test service .
"""Install updater test service.

  If the service was previously installed, it will be updated.

  Returns:
    True if the service is installed successfully.
  """
True if the service is installed successfully.
True if the service is installed successfully .