I am running a JS script on a machine and I want it to open a file that is on that machine. It's supposed to be a minecraft server bot that will open batch files that opens a specific server client, which are needed to start the server with the correct amount of allocated ram. So examples of why I would need it would be that I have modded and vanilla server clients. Say it were to receive "!start vanilla" or something along those lines, it then runs the batch file to start the server. I've been trying to use the wshShell method, but I always get "TypeError: wshShell.Run is not a function"
var wshShell = new ActiveXObject('WScript.Shell');
wshShell.Run("C:\\users\\user\\desktop\\test.bat");
I'm also not sure as to why ActiveXObject errors out. I'm still relatively new to JS so I've been kind of looking online for help. Hopefully I provided enough information to get some help on this.