Start the specified service.

    .. warning::
        You cannot start a disabled service in Windows. If the service is
        disabled, it will be changed to ``Manual`` start.

    Args:
        name (str): The name of the service to start

        timeout (int):
            The time in seconds to wait for the service to start before
            returning. Default is 90 seconds

            .. versionadded:: 2017.7.9,2018.3.4

        with_deps (bool):
            If enabled start the given service and the services the current
            service depends on.

        with_parents (bool):
            If enabled and in case other running services depend on the to be start
            service, this flag indicates that those other services will be started
            as well.

    Returns:
        bool: ``True`` if successful, otherwise ``False``. Also returns ``True``
            if the service is already started

    CLI Example:

    .. code-block:: bash

        salt '*' service.start <service name>

def start(name, timeout=90, with_deps=False, with_parents=False):
    '''
    Start the specified service.

    .. warning::
        You cannot start a disabled service in Windows. If the service is
        disabled, it will be changed to ``Manual`` start.

    Args:
        name (str): The name of the service to start

        timeout (int):
            The time in seconds to wait for the service to start before
            returning. Default is 90 seconds

            .. versionadded:: 2017.7.9,2018.3.4

        with_deps (bool):
            If enabled start the given service and the services the current
            service depends on.

        with_parents (bool):
            If enabled and in case other running services depend on the to be start
            service, this flag indicates that those other services will be started
            as well.

    Returns:
        bool: ``True`` if successful, otherwise ``False``. Also returns ``True``
            if the service is already started

    CLI Example:

    .. code-block:: bash

        salt '*' service.start <service name>
    '''
    # Set the service to manual if disabled
    if disabled(name):
        modify(name, start_type='Manual')

    ret = set()

    # Using a list here to maintain order
    services = ServiceDependencies(name, get_all, info)
    start = services.start_order(with_deps=with_deps, with_parents=with_parents)
    log.debug("Starting services %s", start)
    for name in start:
        try:
            win32serviceutil.StartService(name)
        except pywintypes.error as exc:
            if exc.winerror != 1056:
                raise CommandExecutionError(
                    'Failed To Start {0}: {1}'.format(name, exc.strerror))
            log.debug('Service "%s" is running', name)

        srv_status = _status_wait(service_name=name,
                                  end_time=time.time() + int(timeout),
                                  service_states=['Start Pending', 'Stopped'])
        ret.add(srv_status['Status'] == 'Running')
    return False not in ret