'Neutralino.os.execCommand not work properelly on windows system

I'm trying to make some windows automation app using Neutralino.js. To control windows system, I'm using NirCmd.

When I run below code, works well in Node.js

const { exec } = require('child_process');
exec('nircmd win activate title calculator');

but Neutralino.js not works well with below code.

await Neutralino.os.execCommand('nircmd win activate title calculator');

Weird thing is that another function works well like this.

await Neutralino.os.execCommand('nircmd')

So, I have to use some tricks.

await Neutralino.clipboard.writeText('nircmd win activate title calculator');
await Neutralino.os.execCommand('nircmd sendkeypress lwin+r');
await Neutralino.os.execCommand('nircmd sendkeypress ctrl+v enter');

Is it a bug?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source