#shortcut #windows #lnk

yanked rlnk

create windows shortcuts (lnk files)

0.1.7 Aug 4, 2021
0.1.6 Aug 3, 2021

#5 in #lnk

MIT/Apache

63KB
90 lines

Contains (DOS exe, 58KB) src/bin/Shortcut.exe

rlnk

crates.io API

Usage

Add this to your Cargo.toml:

[dependencies]
rlnk = "0.1.7"

example code

use rlnk::ShellLink;
let target=r"C:\Users\Admin\Desktop\new aa\qiuqiu.exe";
let lnk=r"C:\Users\Admin\Desktop\qiuqiu.lnk";
let mut sl=ShellLink::new();
sl.create_lnk(target,lnk); 

How it works

Shortcut.exe as an external exec_file which should be written to Windows Temp directory is executed with parameters to create windows shortcuts.


lib.rs:

example

let target=r"C:\Users\Admin\Desktop\new aa\qiuqiu.exe";
let lnk=r"C:\Users\Admin\Desktop\qiuqiu.lnk";
let mut sl=ShellLink::new();
sl.create_lnk(target,lnk).unwap();

No runtime deps