coreybutler / coreybutler/node-windows
Can't get running as specific user to work
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 368
- PR merge metrics
- No merged PRs in 30d
Description
The documentation says this:
By default, it will run using the user account that launched the process (i.e. who launched node app.js).
However, if I put this in app.js:
```
var username = process.env['USERPROFILE'].split( path.sep )[2];
```
And log it, I get 'system32' rather than my username.
If I put that same printout in the appservice.js file (which creates the Service object, etc), it prints the username I would expect, which is my username.
I've tried explicitly overriding the Service instance's user object with my credentials and domain name, but that doesn't help either. I get 'system32' in that case as well.
Anyone know if this is a bug, or if I'm doing something wrong?
Thanks in advance!
Contributor guide
Assessment
This issue has not been assessed yet.