我使用包“https://pkg.go.dev/github.com/kardianos/service”來運(yùn)行用Go編寫的應(yīng)用程序作為Windows服務(wù)。我在 中設(shè)置了以下屬性:service.ConfigUsername: "myusername"
Option: service.KeyValue{"password": "mypassword"}當(dāng)我然后安裝程序時(shí),我收到以下錯(cuò)誤:The account name is invalid or does not exist, or the password is invalid for the account name specified.如何設(shè)置 的屬性以使服務(wù)在安裝時(shí)使用指定的憑據(jù)正常運(yùn)行?service.Config
1 回答

白衣染霜花
TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超10個(gè)贊
我自己剛剛找到了解決方案。
Username:`DESKTOP-XXXXXX\myAcount` Option: service.KeyValue{"password": "mypassword"}
- 1 回答
- 0 關(guān)注
- 220 瀏覽
添加回答
舉報(bào)
0/150
提交
取消