0

I have a nodejs program running as background process with nssm (I build an executable and then have it be managed by nssm).

My program needs to open a desktop app when the user requests it, the program is runned fine but the problem is that it is runned as a background process as well !

I want the program to be opened on the desktop because the user has to interact with it.

Here is the code running the program ( I tried running the exec directly as well, to no avail)

const batchfile = `
            start "PROGRAM" "${this.EXEC_PROGRAM_PATH + '\\' + this.EXEC_NAME}" ${this.ARGS.join(' ')}
            `
fs.writeFileSync('launch.bat', batchfile);
// execute the batch file     
const program = child.execFile('launch.bat');

If i run the nodejs program directly (not through nssm) it works, but I need to program to run in the background as it needs to be ready at startup.

Thank you for your help

Victor
  • 11
  • 1

0 Answers0