#link #shortcut #parser #shell #write #windows #writer

lnk

A Rust library to parse and write Windows shortcut files (.lnk)

7 releases (4 breaking)

0.5.1 Jan 11, 2023
0.5.0 Jan 11, 2023
0.4.1 May 16, 2022
0.3.0 Nov 9, 2020
0.1.0 Oct 29, 2019

#288 in Date and time

Download history 60/week @ 2024-07-19 97/week @ 2024-07-26 60/week @ 2024-08-02 84/week @ 2024-08-09 57/week @ 2024-08-16 49/week @ 2024-08-23 91/week @ 2024-08-30 114/week @ 2024-09-06 106/week @ 2024-09-13 115/week @ 2024-09-20 77/week @ 2024-09-27 43/week @ 2024-10-04 65/week @ 2024-10-11 91/week @ 2024-10-18 106/week @ 2024-10-25 160/week @ 2024-11-01

425 downloads per month
Used in 5 crates

MIT license

99KB
1.5K SLoC

Shell Link parser and writer for Rust

Works on any OS - although only really useful in Windows, this library can parse and write .lnk files, a shell link, that can be understood by Windows.

To get started, see the docs.rs documentation.


lib.rs:

Shell Link parser and writer for Rust.

Works on any OS - although only really useful in Windows, this library can parse and write .lnk files, a shell link, that can be understood by Windows.

To get started, see the ShellLink struct.

The full specification of these files can be found at Microsoft's Website.

Read Example

A simple example appears as follows:

use lnk::ShellLink;
// ...
let shortcut = lnk::ShellLink::open("tests/test.lnk").unwrap();
println!("{:#?}", shortcut);

Write Example

A simple example appears as follows:

use lnk::ShellLink;
// ...
ShellLink::new_simple(std::path::Path::new(r"C:\Windows\System32\notepad.exe"));

IMPORTANT!: Writing capability is currently in a very early stage and probably won't work!

Dependencies

~3MB
~61K SLoC