mirror of
https://github.com/fofolee/uTools-ProcessKiller.git
synced 2025-06-07 21:46:33 +08:00
给powershell命令增加-NoProfile参数
This commit is contained in:
parent
dedc91f2d7
commit
b9ede9c60f
@ -29,7 +29,7 @@ getIco = isWin ? require('icon-extractor') : require('file-icon');
|
||||
totalMem = os.totalmem();
|
||||
|
||||
powershell = (cmd, callback) => {
|
||||
const ps = spawn('powershell', ['-Command', cmd], { encoding: 'buffer' })
|
||||
const ps = spawn('powershell', ['-NoProfile', '-Command', cmd], { encoding: 'buffer' })
|
||||
let chunks = [];
|
||||
let err_chunks = [];
|
||||
ps.stdout.on('data', chunk => {
|
||||
@ -89,3 +89,7 @@ taskkill = (task, path, callback) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
tasklist(l => {
|
||||
console.log(l);
|
||||
})
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user