.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
});
.InstallServiceinvokes powershell under the hood. When you set password with$it leaves it unescaped.As workaround I use
.Replace("$", "`$"). Example: