0

my code in node js side is-

const exec = require('child_process').exec;

        var cmdString = 'start C:/myApp/dropbox';

        const child = exec(cmdString,
        (error, stdout, stderr) => {

            console.log(`stdout: ${stdout}`);
            console.log(`stderr: ${stderr}`);
            if (error !== null) {
                console.log(`exec error: ${error}`);
            }
        })

if i start the application from command prompt, I am able to open windows file explore on clicking a button.

But, if i start the application from windows service. I am not able to open file explorer.

Any idea what mistake i am doing in my coding side.

Sumit Sarkar
  • 49
  • 3
  • 7
  • What is it your actually trying to do, as open windows explorer for a windows service doesn't make any sense. In the windows server there is an interact with Desktop option, but I'd say doing this is just not really a good idea. In a multi-user system, aka TSE, it's only going to open in the main console. – Keith Oct 26 '17 at 20:14
  • i created service for my node app. if i start with my created service. I am not able to open file explorer on a button click. – Sumit Sarkar Oct 26 '17 at 20:16
  • I checked that option too, it did not work. – Sumit Sarkar Oct 26 '17 at 20:18
  • Presenting UI from a windows service is very atypical and not recommended. Check this out for more details: https://stackoverflow.com/questions/7347464/running-ui-with-windows-service – Kevin Burdett Oct 26 '17 at 21:52

0 Answers0