i need help to monitor the progressbar from dism.exe on windows systems. dism.exe is spawnd from my node.js script:
const { spawn, exec } = require('child_process');
const ls = exec('dism.exe /Unmount-Image /MountDir:"C:\\WinPE_amd64\\mount" /discard');
ls.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
ls.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
});
ls.on('close', (code) => {
console.log(`child process exited with code ${code}`);
});
The stdout on the terminal:
C:\Users\Admin\Desktop>node test.js stdout: Tool zur Imageverwaltung f�r die Bereitstellung Version: 10.0.17763.1
stdout: Bereitstellung des Abbilds wird aufgehoben
[= 2.0% ]
...
[===========================99.0%========================= ]
[==========================100.0%==========================]
stdout: Der Vorgang wurde erfolgreich beendet.
child process exited with code 0
C:\Users\Admin\Desktop>
I dont understand why the progressbar dont write to stdout/stderr. The "data" event is not fired when the progressbar is displayed/renderd
Can someone help me to get the progressbar passed as string in a cb/function?