windows codepage problem aproach to a fix
This commit is contained in:
parent
e062ace283
commit
31f9742f46
@ -310,7 +310,7 @@ function wmic(command, options) {
|
|||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
try {
|
try {
|
||||||
exec(getWmic() + ' ' + command, options, function (error, stdout) {
|
exec(process.env.WINDIR + '\\system32\\chcp.com 65001 | ' + getWmic() + ' ' + command, options, function (error, stdout) {
|
||||||
resolve(stdout, error);
|
resolve(stdout, error);
|
||||||
}).stdin.end();
|
}).stdin.end();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user