Skip to content

InstallService sets password incorrectly when it contans '$' charecter #29

@jrmnl

Description

@jrmnl

.InstallService invokes powershell under the hood. When you set password with $ it leaves it unescaped.

As workaround I use .Replace("$", "`$"). Example:

InstallService(new InstallSettings {
    Username = username,
    Password = password.Replace("$", "`$"),
    ServiceName = "MyService",
    DisplayName = "MyService",
    ExecutablePath = exePath
});

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