If you do not want to write any native C-module, there is a hacker way to do this easily: using the windows command wmic. This is the command to get the version (found using googling):
wmic datafile where name='c:\\windows\\system32\\notepad.exe' get Version
so you can just run this command in node to complete the task:
var exec = require('child_process').exec
exec('wmic datafile where name="c:\\\\windows\\\\system32\\\\notepad.exe" get Version', function(err,stdout, stderr){
if(!err){
console.log(stdout)
}
});
source
share