Adlan Bousehaba
Adlan Bousehaba

Reputation: 31

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

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

Upvotes: 0

Views: 67

Answers (1)

Chester Ayala
Chester Ayala

Reputation: 228

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
});

Upvotes: 0

Related Questions