Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Write Windows .LNK (MS-SHLLINK) files in pure JS

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages