coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.8k stars 356 forks source link

Check software is installed or not on windows #155

Closed BrstDev123 closed 7 years ago

BrstDev123 commented 7 years ago

Hey there! Can I get the functionality using your module that a software is either installed or not on windows. Actually my node js application is dependent upon the KinectRuntime-v2.0_1409-Setup. So this must be installed on the system to use my node app,

Can I check this using your module?

BrstDev123 commented 7 years ago

Although, I have checked that using

try { var Kinect2 = require("kinect2"); var kinect = new Kinect2();

} catch (err){ console.log('Kinect is not installed. Please install the software.');

open('https://www.microsoft.com/en-in/download/confirmation.aspx?id=44559'); //proceed to ask if they would like to install, or quit. //command to run npm install }

Is there any other better solution ?

coreybutler commented 7 years ago

StackOverflow would be a better forum for this question.

The short answer is you don't need node-windows to do this. If you just need the kinect2 node module, include it in your project code. The general guideline for determining whether software is installed on Windows is to query the registry for it's existence, which could be done by executing a command.

coreybutler commented 7 years ago

I'm closing this here... if you want more detail, let's open a thread on StackOverflow.

BrstDev123 commented 7 years ago

http://stackoverflow.com/questions/42000415/forever-module-with-node-app-executable-file there is the question on SO