Interract with a .exe program with js instead of typing in the program

64 views Asked by At

Hello I'm tryna make a Skyrim server Dashboard.

The server look like this => It seems like a way of terminal (i don't know)

On this server i can type some command like this =>enter image description here when I manualy wrote /help and it show the output.

I tried to run the executable in node js, the server is working, I can join it, And I can see the output on my VSCode Terminal

But I can't input some text or command

enter image description here

Hope you can help me thanks in advance. ##Its my first ask

1

There are 1 answers

4
Chester Ayala On

Add shell: true to the spawn method so you can still pass commands to the process.

const child = require('child_process').spawn("C:/SkyrimTogetherServer.exe", {
    shell: true
});