Closed GregMydlarz closed 4 years ago
The XML generator function in the winsw.js is missing one line for the service account. Original code:
if (config.logOnAs) {
xml.push({
serviceaccount: [
{domain: config.logOnAs.domain || 'NT AUTHORITY'},
{user: config.logOnAs.account || 'LocalSystem'},
{password: config.logOnAs.password || ''},
]
});
}
Working code:
if (config.logOnAs) {
xml.push({
serviceaccount: [
{domain: config.logOnAs.domain || 'NT AUTHORITY'},
{user: config.logOnAs.account || 'LocalSystem'},
{password: config.logOnAs.password || ''},
{allowservicelogon: 'true'}
]
});
}
Want me to create a pull request for that?
Closing thanks to PR #262.
I'm running a file watcher app as a windows service (W10) with the following code used to install the service:
Running the code as an administrator and the service does install properly, but it's stopped, so when I try to start it, the message is that the service can't start for the wrong password. Username and domain are correct. If I copy/paste the password into the Services Manager from my config.js, the service starts up and runs from now on. Why the password (whatever it is) is not passed by that line:
svc.logOnAs.password = config.sqlServerLogin.password;
correctly?