child-shell icon indicating copy to clipboard operation
child-shell copied to clipboard

PS_CMD_FAIL_ERROR: Error code = 0x80005000

Open Genp0 opened this issue 3 years ago • 1 comments

image

image

when I invoke a command, the string was recognized correctly. then it throws an error which is "PS_CMD_FAIL_ERROR: Error code = 0x80005000" cloud you please to tell me how to solve it.

Genp0 avatar Aug 22 '21 16:08 Genp0

In my case i solved with this:

const  Shell = require("node-powershell");
const  { PSCommand }  = require("node-powershell");
 
const ps = new Shell({
  executionPolicy: 'Bypass',
  noProfile: true
});

// Execute Script
let script = new PSCommand(`& "${require('path').resolve(__dirname, 'MYSCRIPT.ps1')}"`);

ps.addCommand(script);

brunomartinspro avatar Aug 23 '21 10:08 brunomartinspro