1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! `lnks` provides a high-level API for reading and writing Windows `.lnk` (Shell Link) files.
//!
//! It wraps the COM-based Shell APIs [`IShellLinkW`](https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ishelllinkw) and [`IPersistFile`](https://learn.microsoft.com/en-us/windows/win32/api/objidl/nn-objidl-ipersistfile), including support for reading and toggling the undocumented "Run as administrator" flag.
//!
//! ## Examples
//!
//! ### Load an existing shortcut
//!
//! ```no_run
//! # use std::path::Path;
//! # fn main() {
//! let path = Path::new(r"C:\Users\Public\Desktop\Notepad.lnk");
//! let shortcut = lnks::Shortcut::load(path).unwrap();
//! # }
//! ```
//!
//! ### Create a new shortcut
//!
//! ```no_run
//! # use std::path::Path;
//! # fn main() {
//! let mut shortcut = lnks::Shortcut::new(r"C:\Windows\System32\notepad.exe");
//! shortcut.arguments = Some(r"C:\Windows\win.ini".to_string());
//!
//! let out = Path::new(r"C:\Users\Public\Desktop\Notepad.lnk");
//! shortcut.save(out).unwrap();
//! # }
//! ```
/// Module containing COM related utils.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;