PackageTrack
Sign in Get early access

windows-service

A crate that provides facilities for management and implementation of windows services

0.8.1 6.4M downloads/mo #3977 most downloaded on crates.io mullvad/windows-service-rs

What this package is like to depend on

Last release 3 months ago

08 May 2026

Ships on a steady schedule

a new release about every 10 months

Nearly every release is documented

notes for 10 of 10 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

10 releases · first in 2018

1 release in the last 12 months

see the full history below

Release timeline

10 releases · Jun 2018 to May 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 10
  1. 0.8.1 08 May 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v0.8.0...v0.8.1

    Open source →
    Release notes

    Changed

    • Upgrade windows-sys dependency to 0.61 and bump the MSRV to 1.71.0.
    Open source →
  2. 0.8.0 19 Feb 2025
    Release notes

    Added:

    • Add missing ServiceAccess flags READ_CONTROL, WRITE_DAC and WRITE_OWNER.

    Changed:

    • Upgrade windows-sys dependency to 0.59 and bump the MSRV to 1.60.0.
    Open source →
    Release notes

    Added

    • Add missing ServiceAccess flags READ_CONTROL, WRITE_DAC and WRITE_OWNER.
    • Add support for protected services (See: ServiceLaunchProtected).

    Changed

    • Upgrade windows-sys dependency to 0.59 and bump the MSRV to 1.60.0.
    Open source →
  3. 0.7.0 16 Apr 2024
    Release notes

    Added

    • Breaking: Add support for user-defined control codes in services.
      (See: Service::notify and notify_service.rs example). This is breaking since
      the ServiceControl enum was exhaustive in version 0.6.0.
    • Breaking: Add support for LidSwitchStateChange in PowerBroadcastSetting. This is breaking
      since PowerBroadcastSetting was an exhaustive enum in version 0.6.0.
    • Breaking: Add support for SERVICE_SYSTEM_START and SERVICE_BOOT_START in service
      start type. This is breaking since the ServiceStartType enum is exhaustive.
    • Add function for obtaining service SID infos. (See: Service::get_config_service_sid_info).

    Changed

    • Breaking: Make a bunch of enums #[non_exhaustive]: Error, PowerBroadcastSetting,
      PowerEventParam and ServiceControl.
    • Breaking: Upgrade windows-sys dependency to 0.52
    Open source →
    Release notes

    Added

    • Breaking: Add support for user-defined control codes in services. (See: Service::notify and notify_service.rs example). This is breaking since the ServiceControl enum was exhaustive in version 0.6.0.
    • Breaking: Add support for LidSwitchStateChange in PowerBroadcastSetting. This is breaking since PowerBroadcastSetting was an exhaustive enum in version 0.6.0.
    • Breaking: Add support for SERVICE_SYSTEM_START and SERVICE_BOOT_START in service start type. This is breaking since the ServiceStartType enum is exhaustive.
    • Add function for obtaining service SID infos. (See: Service::get_config_service_sid_info).

    Changed

    • Breaking: Make a bunch of enums #[non_exhaustive]: Error, PowerBroadcastSetting, PowerEventParam and ServiceControl.
    • Breaking: Upgrade windows-sys dependency to 0.52
    Open source →
  4. 0.6.0 07 Mar 2023
    Release notes

    Added

    • Add support for delayed autostart in services. (See: Service::set_delayed_auto_start)
    • Add support for specifying a preshutdown timeout. (See: Service::set_preshutdown_timeout)
    • Add function for obtaining service names from display names. (See: ServiceManager::service_name_from_display_name)

    Changed

    • Breaking: Consolidate Error type. Remove dependency on err-derive.
    • Breaking: Service::delete does not consume self any longer. Make sure to drop a reference to Service manually if you plan to poll SCM synchronously to determine when the service is removed from system. (See uninstall_service.rs example)
    Open source →
  5. 0.5.0 20 Jul 2022
    Release notes

    Added

    • Implement AsRawHandle for ServiceStatusHandle. Allows using the service handles with other Windows APIs, not covered by this crate.

    Changed

    • Upgrade the crate to Rust 2021 edition and bump the MSRV to 1.58.0
    • Breaking: Change winapi dependency to windows-sys. This is a breaking change since some of the low level Windows types are exposed in the public API of this library.
    • Breaking: Update widestring dependency to 1.0 and remove it from the public API.
    • Breaking: Change ServiceState::to_raw to take self instead of &self.
    Open source →
  6. 0.4.0 12 Aug 2021
    Release notes

    Changed

    • Breaking: ServiceDependency::from_system_identifier(), ServiceManager::new(), ServiceManager::local_computer(), ServiceManager::remote_computer() now take impl AsRef<OsStr> arguments.
    • Upgrade err-derive dependency to 0.3.0
    • ServiceStatusHandle is now Sync.

    Fixed

    • Don't escape binary path for kernel drivers as they don't support that.
    Open source →
  7. 0.3.1 27 Oct 2020
    Release notes

    Added

    • Add support for service description. (See: Service::set_description)

    Fixed

    • Fix segmentation fault in Service functions, that query service config, by moving buffer
      allocation to heap.
    Open source →
    Release notes

    Added

    • Add support for service description. (See: Service::set_description)

    Fixed

    • Fix segmentation fault in Service functions, that query service config, by moving buffer allocation to heap.
    Open source →
  8. 0.3.0 18 Jun 2020
    Release notes

    Added

    • Add support for configuring the service SID info.
    • Add support for changing mandatory configuration settings on service.
    • Add support for service failure actions. (See: ServiceFailureActions,
      Service::update_failure_actions, Service::get_failure_actions,
      Service::set_failure_actions_on_non_crash_failures,
      Service::get_failure_actions_on_non_crash_failures)
    • Add support to pause and continue services. (See: Service::pause and Service::resume)
    • Use QueryServiceStatusEx when querying service status. Allows getting the process ID of a
      running service

    Changed

    • Bumped the MSRV to 1.34, because of err-derive upgrade which depend on quote, to use
      Duration::as_millis() and the TryFrom trait.
    • Breaking: ServiceManager::create_service() now expects a borrowed ServiceInfo argument.
    Open source →
    Release notes

    Added

    • Add support for configuring the service SID info.
    • Add support for changing mandatory configuration settings on service.
    • Add support for service failure actions. (See: ServiceFailureActions, Service::update_failure_actions, Service::get_failure_actions, Service::set_failure_actions_on_non_crash_failures, Service::get_failure_actions_on_non_crash_failures)
    • Add support to pause and continue services. (See: Service::pause and Service::resume)
    • Use QueryServiceStatusEx when querying service status. Allows getting the process ID of a running service

    Changed

    • Bumped the MSRV to 1.34, because of err-derive upgrade which depend on quote, to use Duration::as_millis() and the TryFrom trait.
    • Breaking: ServiceManager::create_service() now expects a borrowed ServiceInfo argument.
    Open source →
  9. 0.2.0 01 Apr 2019
    Release notes

    Added

    • A ServiceExitCode::NO_ERROR constant for easy access to the success value.
    • Add Service::start for starting services programmatically.
    • Add Service::query_config for getting the config of the service.
    • Add ServiceInfo::dependencies for specifying service dependencies.

    Changed

    • Changed service_control_handler::register to accept an FnMut rather than just an Fn for the
      event_handler closure.
    • Upgrade to Rust 2018. This raises the minimum required Rust version to 1.31.0.
    • Replace error-chain error library with err-derive. So all error types are changed.
    • Change ServiceType implementation to use the bitflags! macro.

    Fixed

    • Fix invalid pointer manipulations in service creation routine in ServiceManager.
    • Fix memory leak in service_control_handler::register that did not release event_handler in
      the case of an error.
    • Treat FFI return code 0 as error, instead of treating 1 as success.
    Open source →
    Release notes

    Added

    • Add ServiceExitCode::NO_ERROR constant for easy access to the success value.
    • Add Service::start for starting services programmatically.
    • Add Service::query_config for getting the config of the service.
    • Add ServiceInfo::dependencies for specifying service dependencies.

    Changed

    • Changed service_control_handler::register to accept an FnMut rather than just an Fn for the event_handler closure.
    • Upgrade to Rust 2018. This raises the minimum required Rust version to 1.31.0.
    • Replace error-chain error library with err-derive. So all error types are changed.
    • Change ServiceType implementation to use the bitflags! macro.

    Fixed

    • Fix invalid pointer manipulations in service creation routine in ServiceManager.
    • Fix memory leak in service_control_handler::register that did not release event_handler in the case of an error.
    • Treat FFI return code 0 as error, instead of treating 1 as success.
    Open source →
  10. 0.1.0 04 Jun 2018
    Release notes

    Added

    • Initial release with support for installing, uninstalling and implementing Windows services.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive