Skip to content

Arbitrary SERVICE_NAME_PREFIX #10

@hamano

Description

@hamano

I would like to specify an arbitrary service name for a Windows service.
This is because I want to allow end users to run commands like sc.exe [stop|start] myservice.

I expected this to be possible by renaming wsw.exe, but the SERVICE_NAME_PREFIX is defined as a fixed constant:

pub const SERVICE_NAME_PREFIX: &str = "wsw";

If we want to allow arbitrary service names, possible approaches include:

  • Retrieving the name from the executable file using env::current_exe()
  • Specifying the name as an option during installation

Which approach do you prefer?

Let's organize the naming as follows.

  • Application name (-n option): app
  • Service name prefix: wsw
  • Sservice name: wsw-app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions