npm.io
1.1.2 • Published 8 years ago

win-lnk-parser

Licence
ISC
Version
1.1.2
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
2

win-lnk-parser

Simple package to read some metadata info from .lnk files (windows shortcuts) with support for special characters

Pre-requisites

This package only works on Windows and you must have the following apps:

$ chcp /?
$ cscript /?

Usage

$ npm i --save win-lnk-parser
const lnkParser = require('win-lnk-parser')
const fullPath = "c:\\...\\...\\example.lnk"
const go = async () => {
    const {
        targetPath
        windowStyle
        hotKey
        iconLocation
        description
        workingDirectory
    } = await lnkParser(fullPath, [codePage=850])
}
  • fullPath - absolute path to .lnk file
  • codePage - defaults to 850 (see here for more information)

Author

José Varela (joselcvarela//at//gmail.com)

Keywords