-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliance on cmd.exe #16
Comments
Not sure-- it's been a long time since I looked at that part of the code. Happy to accept a PR that modifies the behaviour in order to make it work without cmd.exe! |
Done! |
That was fast! |
This change will get a warning message below and can't show correct Chinese characters:
child_process.execFile has an option of 'encoding', so I think we can change the variable opts to { env: process.env, cwd: process.env.TEMP ,encoding: consoleEncoding} at line 159. |
We use a package in our corporate environment which imports your wmic module to execute the wmic command. However in our environment normal users (i.e. non admins) do not have access to the command prompt - it's disabled by policy. This breaks the wmic module as you use child_process.spawn to start wmic.exe in a full shell (cmd /c) rather than using child_process.execfile which would run the exe directly. Is this intentional due to the amount of output data the wmic command can generate? Or does the wmic.exe process require a full cmd shell in order to work properly?
The text was updated successfully, but these errors were encountered: