-1

I want to read out the comment of an .msi file with nodejs.

I found this question but the answer doesn't print out the comment of the file.

Is there any way to read out the comment of an .msi file? Also it would be great if this also works on linux.


Edit: I found another question that reads those meta data from a jpeg image. But that module doesn't work for .msi files...

I also found one that reads metadata from .mp3 files


Edit:

Why do I want to get the comment out of the file? Because a .msi file doesn't have an attribute version, the version is written in the comment. Or does some other methode exist to get the version of the software within the installer? (I mean, after installation, the version number is displayed in apps and features in windows when you try to uninstall it)

Nimantha
  • 6,405
  • 6
  • 28
  • 69
  • Does this answer your question? [How to get app name / metadata from file path](https://stackoverflow.com/questions/57836919/how-to-get-app-name-metadata-from-file-path) – Nimantha Nov 03 '21 at 06:58

1 Answers1

0

After many hours of searching, I finally found the answer here on this question.


Package used: exiftool-vendored

const exiftool = require('exiftool-vendored').exiftool;

exiftool
  .read(__dirname + '\\Setup.msi')
  .then(tags =>
    console.log(tags.Comments))
  .catch(err => console.error('Something terrible happened: ', err));
Nimantha
  • 6,405
  • 6
  • 28
  • 69