I am trying to get the owner of a file in Node.js on Windows. In the absence of win32api, I decided to use the PowerShell command:
powershell -Command "(get-acl test.txt).owner"
This works fine from the command line and from the batch file, but just hangs with Node.js exec() :
var exec = require('child_process').exec; exec('powershell -Command "(get-acl test.txt).owner"', function(err,sysout,syserr) { console.dir(sysout); });
The PowerShell process just starts and never ends.
Does anyone have:
- the idea of ββwhy the team will not return to Node.js or preferably
- a sensible way to force a file owner with Node.js on Windows?
tjdett
source share