How can I get file informations from an .msi
file like the comment?
I don't seem to get them via fs module fs.stats
.
To read windows files metadata you can use the get-file-properties package that is a wrapper around the wmic command.
From the doc:
import { getFileProperties, WmicDataObject } from 'get-file-properties'
async function demo() {
// Ensure you are using double backslashes in your file path
const filepath: string = 'C:\\path\\to-my\\file.txt'
let metadata: WmicDataObject
metadata = await getFileProperties(filepath)
console.log(metadata.FileSize)
}