nations / spoticord

Display your Spotify status as a Discord Rich Presence using the RPC API
122 stars 40 forks source link

Wmic is unable to retrieve process list #44

Open Thodor20 opened 6 years ago

Thodor20 commented 6 years ago

I'm getting a problem with wmic. I'm running on Windows 7 and I noticed Wmic wasn't working with the original command using /format:csv as my pc is on a lithuanian locale and only had the en-US csv.xsl. So I changed the path to the en-US csv.xsl but it's still not working, however if I run the command in the command line directly and not using node it's working perfectly fine.

Am I missing something here?

Below is the output of the node application.

(node:7044) Warning: N-API is an experimental feature and could change at any ti
me.
[17:12:57] Connected to Discord! (385061381344591872)
[17:12:59] Failed to fetch Spotify data: { err:
   { Error: Command failed: WMIC process list /format:"%WINDIR%System32wbemen-US
csv"
Invalid XSL format (or) file name.

    at ChildProcess.exithandler (child_process.js:272:12)
    at ChildProcess.emit (events.js:159:13)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
     killed: false,
     code: 44210,
     signal: null,
     cmd: 'WMIC process list /format:"%WINDIR%System32wbemen-UScsv"' },
  msg: 'unable to enumerate processes' }         
cernodile commented 6 years ago

Did you try reading this part of the readme?

Thodor20 commented 6 years ago

I did already try to set the maxBuffer though it did not have any effect, it kept giving the Invalid XSL format error. I tested it with the: