Here are a few links the source codes to my projects, These were made for Educational Purposes and proof of concepts
//using java script to build a ".bat" file to just echo a message //building the batch and cmd commands function E() { let EC = ("@ECHO") let T = ("OFF") let output = `${EC} ${T}` return(output) } console.log(E()) function C() { let Y = ("cd") let OU = ("%TEMP%") let output = `${Y} ${OU}` return(output) } console.log(C()) function Ricky_Bobby(){//the echo command for cmd powershell let LET = ('powershell -command ') let Ricky = LET + ("echo") let Bobby = ("'I am the captain now'") let output = `${Ricky} ${Bobby}` return (output) } console.log(Ricky_Bobby()) function F() { let D = ("PAU") let ED = ("SE") let output = `${D}${ED}` return(output) } console.log(F()) //creating the batch file ".bat" const fs = require('fs') let data = Array(E(), //making batch syntax C(), Ricky_Bobby(), F()) data = data.join('\n') //sending each function string to a new line for porper format fs.writeFile('output.bat', data, (err) => { if (err) throw err; }) fs.writeFileSync("output.bat", data);