SharpeRAD/Cake.Services

InstallService sets password incorrectly when it contans '$' charecter

jrmnl opened this issue · 0 comments

jrmnl commented

.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
});