winlink

1.0.2 • Public • Published

Write & Read Windows .LNK files in pure JS

Implemented following the [MS-SHLLINK] Shell Link (.LNK) Binary File Format Documentation.

While the documentation above is a good starting point, it is missing essential information about the LinkTargetIDList-ItemID structure. This information was obtained by:

Feel free to improve this library, but please make sure to read all sources above before.

Installation:

npm install winlink

Usage:

const winlink = require("winlink");

/* create file-link: writeFile( filename, target ) */
winlink.writeFile( "a.lnk", "C:\\temp\\a.txt" )
.then( () => console.log( "file link created" ) )
.catch( console.log.bind( console ) );

/* create directory-link: writeDirectory( filename, target ) */
winlink.writeDirectory( "test.lnk", "C:\\temp" )
.then( () => console.log( "directory link created" ) )
.catch( console.log.bind( console ) );

Motivation for pure JavaScript:

My intention is to write .lnk-files on samba-mounts under linux without using wine or other helpers.

Package Sidebar

Install

npm i winlink

Weekly Downloads

113

Version

1.0.2

License

MIT

Unpacked Size

38.9 kB

Total Files

6

Last publish

Collaborators

  • geraldwodni