Skip to content

Windows shell replacement in Rust: taskbar, file manager, NTFS search, task manager, disk cleaner. One installer exe.

Rust

Review fixes: rs-du quarantine list in an admin-only place, payload\ two levels up only from target\release, rtaskmgr and rust-explorer keep foreign settings, rust-search restores Windows Search first, DiagTrack left to debloat, shared reg query parser; topbar: Appx work in progress

Lemxy0b48b988e046
diff --git a/Cargo.lock b/Cargo.lock
index c3107a7..29d74f6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -33,6 +33,9 @@ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
[[package]]
name = "debloat"
version = "0.1.0"
+dependencies = [
+ "winrust-common",
+]
[[package]]
name = "embed-resource"
diff --git a/README.md b/README.md
index 26d930b..dc382f0 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ The installer is in English. The **Русский** button in its corner (or "La
| **rust-search** | File search over all NTFS drives, Alt+Space | Disables the Windows Search service, blocks SearchHost.exe, hides the taskbar search box |
| **rtaskmgr-win32** | Task Manager (Ctrl+Shift+Esc opens it) | `taskmgr.exe` is redirected to it (the system file is untouched). Also installs the **rs-du** disk cleaner |
| **topbar** | A Windows 11-style bottom bar: windows, clock, volume, menus | Hides the stock taskbar. Also installs **reshell** (hotkeys: Win+1/2/3 and Win+\` switch desktops, Win+D shows the desktop, Win+I opens Settings, Win+E the file manager; brings the taskbar back if the bar dies), **rs-du**, and a block in your PowerShell profile (`zoxide`, `grep`=rg, `ll`=eza, `cat`=bat; does nothing if they are missing) |
-| **rust-explorer** | A file manager with tabs, and the desktop | Folders and drives open in it; **Explorer stops being the shell** (comes back by itself if topbar fails). Disables DiagTrack, PcaSvc, InventorySvc, lfsvc, cbdhsvc, sets DoSvc to manual, merges svchost processes. Requires topbar |
+| **rust-explorer** | A file manager with tabs, and the desktop | Folders and drives open in it; **Explorer stops being the shell** (comes back by itself if topbar fails). Disables PcaSvc, InventorySvc, lfsvc, cbdhsvc, sets DoSvc to manual, merges svchost processes. Requires topbar |
| **wiztree** | A disk-usage map ("WinRust Disk" in Start) | Nothing, apart from the file and a shortcut |
| **photoview** | A fast photo viewer | Adds it to "Open with" (it does not become the default) |
| **debloat** | Off: telemetry, Copilot, Recall, Start ads, Edge in the background | Services and registry policies; old values are saved and restored on uninstall. **Command line only:** `install debloat --yes` |
diff --git a/README.ru.md b/README.ru.md
index 03fb070..462b1da 100644
--- a/README.ru.md
+++ b/README.ru.md
@@ -33,7 +33,7 @@
| **rust-search** | Поиск файлов по всем NTFS-дискам, Alt+Space | Отключается служба поиска Windows, блокируется SearchHost.exe, прячется строка поиска на панели |
| **rtaskmgr-win32** | Диспетчер задач (Ctrl+Shift+Esc открывает его) | Запуск `taskmgr.exe` перенаправляется на него (системный файл не трогается). Заодно ставится чистильщик диска **rs-du** |
| **topbar** | Нижняя панель в стиле Windows 11: окна, часы, громкость, меню | Стандартная панель задач прячется. Заодно ставятся **reshell** (хоткеи: Win+1/2/3 и Win+\` переключают рабочие столы, Win+D показывает рабочий стол, Win+I открывает Параметры, Win+E файловый менеджер; возвращает панель задач, если topbar упал), **rs-du** и блок в профиле PowerShell (`zoxide`, `grep`=rg, `ll`=eza, `cat`=bat; молчит, если их нет) |
-| **rust-explorer** | Файловый менеджер с вкладками и рабочий стол | Папки и диски открываются в нём; **Проводник перестаёт быть оболочкой** (возвращается сам, если topbar не работает). Отключаются DiagTrack, PcaSvc, InventorySvc, lfsvc, cbdhsvc, DoSvc ставится вручную, процессы svchost объединяются. Нужен topbar |
+| **rust-explorer** | Файловый менеджер с вкладками и рабочий стол | Папки и диски открываются в нём; **Проводник перестаёт быть оболочкой** (возвращается сам, если topbar не работает). Отключаются PcaSvc, InventorySvc, lfsvc, cbdhsvc, DoSvc ставится вручную, процессы svchost объединяются. Нужен topbar |
| **wiztree** | Карта занятого места на диске («WinRust Disk» в Пуске) | Ничего, кроме файла и ярлыка |
| **photoview** | Быстрый просмотр фото | Добавляется в «Открыть с помощью» (по умолчанию не назначается) |
| **debloat** | Отключает телеметрию, Copilot, Recall, рекламу в Пуске, фоновый Edge | Службы и политики реестра; старые значения сохраняются и возвращаются при удалении. **Только из командной строки:** `install debloat --yes` |
diff --git a/common/src/lib.rs b/common/src/lib.rs
index ea39770..fde001f 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -10,6 +10,7 @@ use std::{
pub mod desktop;
pub mod mft;
+pub mod reg;
static LANG: AtomicU8 = AtomicU8::new(0); // 0 = not read yet, 1 = English, 2 = Russian
diff --git a/common/src/reg.rs b/common/src/reg.rs
new file mode 100644
index 0000000..a638258
--- /dev/null
+++ b/common/src/reg.rs
@@ -0,0 +1,34 @@
+//! Reads the output of `reg query <key> /v <name>` (the installer and debloat both change and restore values through reg.exe).
+
+/// The value line as (type, data), e.g. ("REG_DWORD", "0x1"). None = no value in the output.
+/// reg.exe writes it as ` <name> <type> <data>`, four spaces apart; names and data may contain spaces themselves.
+pub fn value(out: &str) -> Option<(&str, &str)> {
+ out.lines().find_map(|l| {
+ let mut f = l.strip_prefix(" ")?.splitn(3, " ");
+ let (_, ty) = (f.next()?, f.next()?);
+ ty.starts_with("REG_").then(|| (ty, f.next().unwrap_or("").trim_end()))
+ })
+}
+
+/// The value as a number when it is a REG_DWORD; None when missing or of another type.
+pub fn dword(out: &str) -> Option<u32> {
+ match value(out)? {
+ ("REG_DWORD", d) => u32::from_str_radix(d.trim_start_matches("0x"), 16).ok(),
+ _ => None,
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn reads_reg_query_output() {
+ let key = "\r\nHKEY_LOCAL_MACHINE\\SOFTWARE\\REG_X\r\n";
+ assert_eq!(dword(&format!("{key} AllowTelemetry REG_DWORD 0x1a\r\n\r\n")), Some(26));
+ assert_eq!(value(&format!("{key} Debugger REG_SZ \"C:\\Program Files\\x.exe\" /e\r\n")), Some(("REG_SZ", "\"C:\\Program Files\\x.exe\" /e")));
+ assert_eq!(value(" (Default) REG_SZ \r\n"), Some(("REG_SZ", "")));
+ assert_eq!(dword(" V REG_SZ 0x1\r\n"), None);
+ assert_eq!(value("ERROR: The system was unable to find the specified registry key or value."), None);
+ }
+}
diff --git a/plugins/debloat/Cargo.toml b/plugins/debloat/Cargo.toml
index e1fee24..be25302 100644
--- a/plugins/debloat/Cargo.toml
+++ b/plugins/debloat/Cargo.toml
@@ -2,3 +2,6 @@
name = "debloat"
version = "0.1.0"
edition = "2024"
+
+[dependencies]
+winrust-common = { path = "../../common" }
diff --git a/plugins/debloat/src/main.rs b/plugins/debloat/src/main.rs
index 99f9375..8aee060 100644
--- a/plugins/debloat/src/main.rs
+++ b/plugins/debloat/src/main.rs
@@ -83,9 +83,8 @@ fn parse_val(ok: bool, out: &str) -> Val {
if !ok {
return Val::Missing;
}
- match out.lines().find(|l| l.contains("REG_")) {
- Some(l) if l.contains("REG_DWORD") => l.split_whitespace().last().and_then(|t| u32::from_str_radix(t.trim_start_matches("0x"), 16).ok()).map_or(Val::Other, Val::Dword),
- Some(_) => Val::Other,
+ match winrust_common::reg::value(out) {
+ Some(_) => winrust_common::reg::dword(out).map_or(Val::Other, Val::Dword),
None => Val::Missing,
}
}
diff --git a/plugins/rs-du/README.md b/plugins/rs-du/README.md
index f80e61d..c6609c7 100644
--- a/plugins/rs-du/README.md
+++ b/plugins/rs-du/README.md
@@ -33,7 +33,7 @@
- **По выбору** (красное): корзина, `Windows.old`, старые установщики и архивы в «Загрузках» (>90 дней), большие забытые видео/архивы (>1 ГБ, не тронуты >180 дней, только в папках пользователя, не облако и не AppData).
- `target`/`node_modules` берутся только если сама папка и её дочерние (release, debug...) не менялись 30 дней. Пункты меньше 1 МБ не показываются.
- Режимы: `--clean` только список; `--clean --apply` зелёное+жёлтое; `--apply --safe` только зелёное; `--apply --all` всё; `--ask` нумерованный список и выбор (Enter, `a`, `n`, номера красных).
-- Красные файлы из «Загрузок» и больших файлов не удаляются, а уходят в карантин `X:\.rs-du-quarantine` на 30 дней. `rs-du --restore` возвращает, `rs-du --purge` освобождает место сразу.
+- Красные файлы из «Загрузок» и больших файлов не удаляются, а уходят в карантин `X:\.rs-du-quarantine` на 30 дней. Список того, что в карантине, хранится рядом с `rs-du.exe` (`quarantine-X.tsv`, писать туда может только администратор). `rs-du --restore` возвращает, `rs-du --purge` освобождает место сразу.
- Не сделано: определение остатков удалённых программ, точка восстановления (вместо неё карантин), карта диска, дубликаты, GUI.
### 3. Дубликаты (этап 3, отдельно)
diff --git a/plugins/rs-du/src/clean.rs b/plugins/rs-du/src/clean.rs
index c62e127..0cc5676 100644
--- a/plugins/rs-du/src/clean.rs
+++ b/plugins/rs-du/src/clean.rs
@@ -151,14 +151,30 @@ fn select(s: &str, sel: &mut [bool]) {
}
}
-fn qroot(p: &Path) -> PathBuf { PathBuf::from(format!("{}:\\.rs-du-quarantine", p.to_string_lossy().chars().next().unwrap_or('C'))) }
+fn qroot(drive: char) -> PathBuf { PathBuf::from(format!(r"{}:\.rs-du-quarantine", drive.to_ascii_uppercase())) }
+
+/// The list of quarantined items lives next to rs-du.exe (Program Files, admin-only), not in the quarantine folder: under a
+/// drive root any user can create and edit files, and a forged row would make this elevated process delete or move any path.
+fn mpath(drive: char) -> PathBuf {
+ env::current_exe().expect("exe path").with_file_name(format!("quarantine-{}.tsv", drive.to_ascii_uppercase()))
+}
+
+/// Closes the quarantine folder to everyone but administrators and SYSTEM (inherited from a drive root, users could edit it).
+// shortcut: a folder a user created before rs-du ever ran stays owned by them; the trusted list above keeps that harmless.
+fn lock(root: &Path) {
+ static ONCE: std::sync::Once = std::sync::Once::new();
+ ONCE.call_once(|| { let _ = std::process::Command::new("icacls").arg(root).args(["/inheritance:r", "/grant:r", "*S-1-5-32-544:(OI)(CI)F", "*S-1-5-18:(OI)(CI)F", "/Q"]).output(); });
+}
fn quarantine(p: &Path, stamp: u64, n: usize) -> bool {
- let root = qroot(p);
+ let drive = p.to_string_lossy().chars().next().unwrap_or('C');
+ let root = qroot(drive);
let dir = root.join(stamp.to_string());
let to = dir.join(format!("{n}_{}", p.file_name().unwrap_or_default().to_string_lossy()));
- let ok = fs::create_dir_all(&dir).is_ok() && fs::rename(p, &to).is_ok();
- if ok && let Ok(mut f) = fs::OpenOptions::new().append(true).create(true).open(root.join("manifest.tsv")) {
+ let made = fs::create_dir_all(&dir).is_ok();
+ if made { lock(&root); }
+ let ok = made && fs::rename(p, &to).is_ok();
+ if ok && let Ok(mut f) = fs::OpenOptions::new().append(true).create(true).open(mpath(drive)) {
let _ = writeln!(f, "{stamp}\t{}\t{}", p.display(), to.display());
}
ok
@@ -166,12 +182,18 @@ fn quarantine(p: &Path, stamp: u64, n: usize) -> bool {
type Row = (u64, PathBuf, PathBuf); // (when, original path, quarantined path)
-fn manifest(drive: char) -> (PathBuf, Vec<Row>) {
- let m = PathBuf::from(format!("{drive}:\\.rs-du-quarantine\\manifest.tsv"));
- let rows = fs::read_to_string(&m).unwrap_or_default().lines().filter_map(|l| {
+/// Rows whose quarantined path is not inside this drive's quarantine folder are dropped: purge deletes that path.
+fn parse(text: &str, drive: char) -> Vec<Row> {
+ let root = qroot(drive);
+ text.lines().filter_map(|l| {
let mut s = l.splitn(3, '\t');
Some((s.next()?.parse().ok()?, s.next()?.into(), s.next()?.into()))
- }).collect();
+ }).filter(|r: &Row| r.2.starts_with(&root) && !r.2.components().any(|c| c == std::path::Component::ParentDir)).collect()
+}
+
+fn manifest(drive: char) -> (PathBuf, Vec<Row>) {
+ let m = mpath(drive);
+ let rows = parse(&fs::read_to_string(&m).unwrap_or_default(), drive);
(m, rows)
}
@@ -195,7 +217,7 @@ pub fn purge(drive: char, all: bool) {
keep.push(r);
}
save(&m, &keep);
- for d in subdirs(m.parent().unwrap_or(Path::new("")), |_| true) { let _ = fs::remove_dir(d); } // only empty ones go
+ for d in subdirs(&qroot(drive), |_| true) { let _ = fs::remove_dir(d); } // only empty ones go
if freed > 0 { println!("quarantine emptied: {} freed", human(freed)); }
}
@@ -304,9 +326,14 @@ mod tests {
let d = env::temp_dir().join("rs-du-test-manifest");
let _ = fs::create_dir_all(&d);
let m = d.join("manifest.tsv");
- save(&m, &[(5, "C:\\a".into(), "C:\\q\\1_a".into())]);
- let rows: Vec<Row> = fs::read_to_string(&m).unwrap().lines().filter_map(|l| { let mut s = l.splitn(3, '\t'); Some((s.next()?.parse().ok()?, s.next()?.into(), s.next()?.into())) }).collect();
- assert_eq!(rows, vec![(5, PathBuf::from("C:\\a"), PathBuf::from("C:\\q\\1_a"))]);
+ save(&m, &[(5, r"C:\a".into(), r"C:\.rs-du-quarantine\5\1_a".into())]);
+ assert_eq!(parse(&fs::read_to_string(&m).unwrap(), 'c'), vec![(5, PathBuf::from(r"C:\a"), PathBuf::from(r"C:\.rs-du-quarantine\5\1_a"))]);
let _ = fs::remove_dir_all(&d);
}
+
+ #[test]
+ fn manifest_rows_outside_the_quarantine_are_dropped() {
+ let t = [r"C:\Windows\System32", r"C:\.rs-du-quarantine\..\Windows", r"D:\.rs-du-quarantine\1\a"].map(|q| format!("0\tC:\\x\t{q}")).join("\n");
+ assert!(parse(&t, 'C').is_empty());
+ }
}
diff --git a/plugins/topbar/Cargo.toml b/plugins/topbar/Cargo.toml
index 439522c..1df39eb 100644
--- a/plugins/topbar/Cargo.toml
+++ b/plugins/topbar/Cargo.toml
@@ -5,6 +5,6 @@ edition = "2024"
[dependencies]
winrust-common = { path = "../../common" }
-windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_Globalization", "Win32_Graphics_Dwm", "Win32_Graphics_Gdi", "Win32_Graphics_GdiPlus", "Win32_NetworkManagement_WiFi", "Win32_NetworkManagement_Ndis", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_DataExchange", "Win32_System_Diagnostics_ToolHelp", "Win32_System_LibraryLoader", "Win32_System_Power", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_Threading", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] }
+windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_Globalization", "Win32_Graphics_Dwm", "Win32_Graphics_Gdi", "Win32_Graphics_GdiPlus", "Win32_NetworkManagement_WiFi", "Win32_NetworkManagement_Ndis", "Win32_Security", "Win32_Storage_FileSystem", "Win32_Storage_Packaging_Appx", "Win32_System_DataExchange", "Win32_System_Diagnostics_ToolHelp", "Win32_System_LibraryLoader", "Win32_System_Power", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_Threading", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] }
# COM only where raw vtables would be long: master volume and .lnk targets
windows = { version = "0.62", features = ["Win32_Media_Audio", "Win32_Media_Audio_Endpoints", "Win32_System_Com", "Win32_System_Com_StructuredStorage", "Win32_System_Variant", "Win32_Graphics_Gdi", "Win32_UI_Shell", "Win32_UI_Shell_Common", "Win32_Storage_FileSystem"] }
diff --git a/plugins/topbar/src/main.rs b/plugins/topbar/src/main.rs
index 7e9f452..df68210 100644
--- a/plugins/topbar/src/main.rs
+++ b/plugins/topbar/src/main.rs
@@ -838,6 +838,53 @@ unsafe fn win_icon(w: HWND) -> HICON {
if ic.is_null() { icon_of(w) } else { ic }
}
+/// "c:\program files\windowsapps\claude_5.1.0.0_x64__pzs8\app\claude.exe" -> ("claude_pzs8", "app\claude.exe"):
+/// the package family (name + publisher id, the same across versions) and the path inside the package folder.
+fn msix_family(target: &str) -> Option<(String, String)> {
+ let l = target.to_lowercase();
+ let (_, tail) = l.split_once(r"\windowsapps\")?;
+ let (folder, rest) = tail.split_once('\\')?;
+ let parts: Vec<&str> = folder.split('_').collect(); // name_version_arch_resourceid_publisherid
+ (parts.len() == 5).then(|| (format!("{}_{}", parts[0], parts[4]), rest.to_string()))
+}
+
+/// A pin of a Store (MSIX) app points into its versioned package folder, which is gone after every app update
+/// ("Windows cannot find ...\Claude_5.11492.5.0_x64__...\claude.exe"). Re-points the .lnk to the installed version.
+/// Returns the new target (lower-case), None if the target exists or is not in a package.
+unsafe fn fix_msix_pin(lnk: &[u16], target: &str) -> Option<String> {
+ use windows_sys::Win32::Storage::Packaging::Appx::{GetPackagePathByFullName, GetPackagesByPackageFamily};
+ if target.is_empty() || std::path::Path::new(target).exists() {
+ return None;
+ }
+ let (family, rest) = msix_family(target)?;
+ let fam = wide(&family);
+ let (mut count, mut len) = (0u32, 0u32);
+ GetPackagesByPackageFamily(fam.as_ptr(), &mut count, null_mut(), &mut len, null_mut()); // sizes only
+ if count == 0 {
+ return None; // the app was uninstalled
+ }
+ let (mut names, mut buf) = (vec![null_mut::<u16>(); count as usize], vec![0u16; len as usize]);
+ if GetPackagesByPackageFamily(fam.as_ptr(), &mut count, names.as_mut_ptr(), &mut len, buf.as_mut_ptr()) != 0 {
+ return None;
+ }
+ let mut path = [0u16; 520];
+ let mut plen = path.len() as u32;
+ if GetPackagePathByFullName(names[0], &mut plen, path.as_mut_ptr()) != 0 {
+ return None;
+ }
+ let new = std::path::Path::new(&wstr_of(&path)).join(&rest);
+ if !new.exists() {
+ return None;
+ }
+ let new = new.to_string_lossy().to_lowercase();
+ let sl: IShellLinkW = CoCreateInstance(&ShellLink, None, CLSCTX_INPROC_SERVER).ok()?;
+ let pf = sl.cast::<IPersistFile>().ok()?;
+ pf.Load(PCWSTR(lnk.as_ptr()), STGM(0)).ok()?;
+ sl.SetPath(PCWSTR(wide(&new).as_ptr())).ok()?;
+ pf.Save(PCWSTR(lnk.as_ptr()), true).ok()?;
+ Some(new)
+}
+
/// Pinned apps (the .lnk files Windows keeps for the taskbar) with their icons and target exe.
unsafe fn load_pins() {
let Some(appdata) = std::env::var_os("APPDATA") else { return };
@@ -848,6 +895,7 @@ unsafe fn load_pins() {
for f in files {
let lnk = wide(&f.to_string_lossy());
let target = lnk_target(&lnk);
+ let target = fix_msix_pin(&lnk, &target).unwrap_or(target);
let icon = lnk_icon(&lnk, &target);
PINS.with_borrow_mut(|p| p.push(Pin { lnk, target, icon }));
}
@@ -1933,7 +1981,11 @@ unsafe fn click(h: i32, left: bool, mid: bool) {
1.. => {
let (wins, lnk) = BTNS.with_borrow(|b| b.get(h as usize).map(|b| (b.wins.clone(), b.pin.and_then(|p| PINS.with_borrow(|p2| p2.get(p).map(|x| x.lnk.clone()))))).unwrap_or_default());
match (wins.first(), left) {
- (None, true) => lnk.iter().for_each(|l| open(l)), // not running: launch the pinned app
+ // not running: launch the pinned app (a Store app may have updated since the pins were loaded)
+ (None, true) => lnk.iter().for_each(|l| {
+ PINS.with_borrow_mut(|p| p.iter_mut().filter(|x| x.lnk == *l).for_each(|x| x.target = fix_msix_pin(l, &x.target).unwrap_or(std::mem::take(&mut x.target))));
+ open(l)
+ }),
(Some(&w), false) => close_window(w), // right / middle click
(Some(&w), true) => {
// like the Windows taskbar: the active app's button minimizes it, a minimized one restores, any other raises
@@ -2254,6 +2306,40 @@ mod tests {
assert_eq!(super::mix(super::rgb(0, 0, 0), super::rgb(200, 100, 50), 1.0), super::rgb(200, 100, 50));
assert_eq!(super::mix(super::rgb(0, 0, 0), super::rgb(200, 100, 50), 0.5), super::rgb(100, 50, 25));
}
+
+ #[test]
+ fn msix_family_from_package_path() {
+ let f = super::msix_family(r"C:\Program Files\WindowsApps\Claude_5.11492.5.0_x64__pzs8sxrjxfjjc\app\claude.exe");
+ assert_eq!(f, Some(("claude_pzs8sxrjxfjjc".into(), r"app\claude.exe".into())));
+ assert_eq!(super::msix_family(r"C:\Program Files\Steam\steam.exe"), None);
+ }
+
+ #[test]
+ fn stale_claude_pin_resolves_to_installed_version() {
+ // real system check: skipped where the Claude package is not installed (CI)
+ let old = r"c:\program files\windowsapps\claude_5.11492.5.0_x64__pzs8sxrjxfjjc\app\claude.exe";
+ let Some((fam, _)) = super::msix_family(old) else { panic!() };
+ let mut n = 0u32;
+ let mut len = 0u32;
+ unsafe { windows_sys::Win32::Storage::Packaging::Appx::GetPackagesByPackageFamily(super::wide(&fam).as_ptr(), &mut n, std::ptr::null_mut(), &mut len, std::ptr::null_mut()) };
+ if n == 0 {
+ return;
+ }
+ let tmp = std::env::temp_dir().join("topbar-msix-test.lnk");
+ let _ = std::fs::remove_file(&tmp);
+ unsafe {
+ use windows::Win32::System::Com::*;
+ let _ = CoInitializeEx(None, COINIT_APARTMENTTHREADED);
+ let sl: windows::Win32::UI::Shell::IShellLinkW = CoCreateInstance(&windows::Win32::UI::Shell::ShellLink, None, CLSCTX_INPROC_SERVER).unwrap();
+ sl.SetPath(windows::core::PCWSTR(super::wide(old).as_ptr())).unwrap();
+ windows::core::Interface::cast::<IPersistFile>(&sl).unwrap().Save(windows::core::PCWSTR(super::wide(&tmp.to_string_lossy()).as_ptr()), true).unwrap();
+ let lnk = super::wide(&tmp.to_string_lossy());
+ let new = super::fix_msix_pin(&lnk, old).expect("re-pointed");
+ assert!(std::path::Path::new(&new).exists() && new.ends_with(r"\app\claude.exe"), "{new}");
+ assert_eq!(super::lnk_target(&lnk), new);
+ }
+ let _ = std::fs::remove_file(&tmp);
+ }
}
#[cfg(test)]
diff --git a/src/install/explorer.rs b/src/install/explorer.rs
index 9d083f4..48a0ffb 100644
--- a/src/install/explorer.rs
+++ b/src/install/explorer.rs
@@ -19,7 +19,8 @@ pub(crate) const RX_FOLDERS: [&str; 3] = [r"HKCU\Software\Classes\Directory\shel
// svchost RAM trim, done with rust-explorer: (service, Start we set, Windows default). Uninstall puts back the Windows defaults,
// not the values found at install: they may already be our own (the same tweak was first run by hand).
// DoSvc's key is ACL-protected on some builds, so every step is soft: a refused one is only a warning.
-pub(crate) const RX_SVCS: [(&str, u32, u32); 6] = [("DiagTrack", 4, 2), ("PcaSvc", 4, 2), ("InventorySvc", 4, 2), ("lfsvc", 4, 3), ("cbdhsvc", 4, 2), ("DoSvc", 3, 2)];
+// DiagTrack (telemetry) is debloat's job: two plugins switching it would turn it back on when either one is removed.
+pub(crate) const RX_SVCS: [(&str, u32, u32); 5] = [("PcaSvc", 4, 2), ("InventorySvc", 4, 2), ("lfsvc", 4, 3), ("cbdhsvc", 4, 2), ("DoSvc", 3, 2)];
pub(crate) const SPLIT_KEY: &str = r"HKLM\SYSTEM\CurrentControlSet\Control";
pub(crate) const SPLIT_DEFAULT: u32 = 3670016; // 3.5 GB: above it Windows gives every service its own svchost
@@ -31,12 +32,21 @@ pub(crate) fn rx_trim(on: bool) {
let _ = run("sc.exe", &["stop", s]); // the per-user cbdhsvc_xxxx instance stops at the next sign-in
}
}
+ // launchers up to v0.2.1 disabled DiagTrack here: put it back, unless debloat is the one keeping it off
+ if !on && !db_dir().join("debloat.exe").is_file() {
+ soft("DiagTrack", run("reg", &["add", r"HKLM\SYSTEM\CurrentControlSet\Services\DiagTrack", "/v", "Start", "/t", "REG_DWORD", "/d", "2", "/f"]));
+ }
let t = if on { 0x4000000 } else { SPLIT_DEFAULT };
soft("SvcHostSplitThresholdInKB", run("reg", &["add", SPLIT_KEY, "/v", "SvcHostSplitThresholdInKB", "/t", "REG_DWORD", "/d", &t.to_string(), "/f"]));
}
+/// In our Program Files folder (admin-only): a .reg a user could plant would be imported by the elevated uninstall.
+pub(crate) fn rx_folders_bak(i: usize) -> PathBuf {
+ rx_dir().join(format!("folders-{i}.reg"))
+}
+
pub(crate) fn rx_lnk() -> PathBuf {
- PathBuf::from(env::var("ProgramData").unwrap_or_else(|_| r"C:\ProgramData".into())).join(r"plugin-launcher\rs-overlay.lnk")
+ program_data().join(r"plugin-launcher\rs-overlay.lnk")
}
pub(crate) fn rx_install() -> Result<(), String> {
@@ -58,6 +68,13 @@ pub(crate) fn rx_install() -> Result<(), String> {
}
// folders and drives opened by other programs, the desktop, Win+R: rust-explorer. DelegateExecute is emptied on purpose:
// while it is set, Windows ignores the command and uses Explorer's built-in handler.
+ // Another file manager's verbs (Directory Opus, Total Commander) are exported first, once, and imported back on uninstall.
+ for (i, k) in RX_FOLDERS.iter().enumerate() {
+ let (bak, ours) = (rx_folders_bak(i), out("reg", &["query", &format!(r"{k}\command"), "/ve"]).is_ok_and(|c| c.to_lowercase().contains("rust-explorer")));
+ if !bak.is_file() && !ours && run("reg", &["query", k]).is_ok() {
+ run("reg", &["export", k, &bak.display().to_string(), "/y"])?;
+ }
+ }
for k in RX_FOLDERS {
let c = format!(r"{k}\command");
run("reg", &["add", &c, "/ve", "/t", "REG_SZ", "/d", &format!("\"{}\" \"%1\"", fm.display()), "/f"])?;
@@ -78,7 +95,7 @@ pub(crate) fn rx_install() -> Result<(), String> {
// Start it now, with the user's normal token: explorer.exe opens a shortcut unelevated, and the shortcut carries --overlay.
let lnk = rx_lnk();
let _ = fs::create_dir_all(lnk.parent().unwrap());
- soft(t!("overlay не запущен сейчас: он стартует при следующем входе", "overlay is not running now: it starts at the next logon"), run("powershell", &["-NoProfile", "-Command", &format!("$s=(New-Object -ComObject WScript.Shell).CreateShortcut('{}'); $s.TargetPath='{}'; $s.Arguments='--overlay'; $s.Save()", lnk.display(), sh.display())]));
+ soft(t!("overlay не запущен сейчас: он стартует при следующем входе", "overlay is not running now: it starts at the next logon"), shortcut(&lnk, &sh, "--overlay"));
let _ = Command::new("explorer.exe").arg(&lnk).spawn();
Ok(())
})
@@ -92,8 +109,12 @@ pub(crate) fn rx_uninstall() -> Result<(), String> {
let _ = run("schtasks", &["/delete", "/tn", "rs-overlay", "/f"]);
let _ = run("reg", &["delete", RX_SWITCH, "/f"]);
rx_trim(false);
- for k in RX_FOLDERS {
+ for (i, k) in RX_FOLDERS.iter().enumerate() {
let _ = run("reg", &["delete", k, "/f"]); // only our HKCU override; the system's verbs under HKLM stay
+ let bak = rx_folders_bak(i);
+ if bak.is_file() {
+ soft(&tf!("привязка папок {k} не возвращена", "folder verbs {k} were not restored"), run("reg", &["import", &bak.display().to_string()]));
+ }
}
for n in ["rs-shell.exe", "rust-explorer.exe"] {
let _ = run("taskkill", &["/f", "/im", n]);
diff --git a/src/install/mod.rs b/src/install/mod.rs
index 420e075..adbb46e 100644
--- a/src/install/mod.rs
+++ b/src/install/mod.rs
@@ -30,8 +30,21 @@ pub(crate) fn soft(what: &str, r: Result<(), String>) {
}
}
+pub(crate) fn program_data() -> PathBuf {
+ PathBuf::from(env::var("ProgramData").unwrap_or_else(|_| r"C:\ProgramData".into()))
+}
+
+/// Start Menu shortcut: search and the bar's Start panel list Start Menu shortcuts only.
+pub(crate) fn start_lnk(name: &str) -> PathBuf {
+ program_data().join(format!(r"Microsoft\Windows\Start Menu\Programs\{name}.lnk"))
+}
+
+pub(crate) fn shortcut(lnk: &Path, target: &Path, args: &str) -> Result<(), String> {
+ run("powershell", &["-NoProfile", "-Command", &format!("$s=(New-Object -ComObject WScript.Shell).CreateShortcut('{}'); $s.TargetPath='{}'; $s.Arguments='{args}'; $s.Save()", lnk.display(), target.display())])
+}
+
pub(crate) fn log(s: &str) {
- let d = PathBuf::from(env::var("ProgramData").unwrap_or_else(|_| r"C:\ProgramData".into())).join("plugin-launcher");
+ let d = program_data().join("plugin-launcher");
let _ = fs::create_dir_all(&d);
if let Ok(mut f) = fs::OpenOptions::new().create(true).append(true).open(d.join("install.log")) {
let t = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_secs());
@@ -53,19 +66,23 @@ pub(crate) fn put(src: &Path, dst: &Path) -> Result<(), String> {
}
pub(crate) fn reg_dword(key: &str, name: &str) -> Option<u32> {
- let o = out("reg", &["query", key, "/v", name]).ok()?;
- let t = o.lines().find(|l| l.contains("REG_DWORD"))?.split_whitespace().last()?;
- u32::from_str_radix(t.trim_start_matches("0x"), 16).ok()
+ i18n::reg::dword(&out("reg", &["query", key, "/v", name]).ok()?)
+}
+
+/// A REG_SZ (or any string-like) value as text.
+pub(crate) fn reg_str(key: &str, name: &str) -> Option<String> {
+ i18n::reg::value(&out("reg", &["query", key, "/v", name]).ok()?).map(|(_, d)| d.to_string())
}
include!(concat!(env!("OUT_DIR"), "/payload.rs")); // PAYLOAD: the exes listed in payload.txt, embedded by build.rs
/// Update without rebuilding the launcher: an exe in `payload\` next to this one (or two levels up, the cargo
-/// target\release layout) wins over the embedded copy. Trust level = the launcher exe's own folder.
+/// target\release layout) wins over the embedded copy. Trust level = the launcher exe's own folder. Two levels up only from
+/// target\release: from C:\Program Files\WinRust it would be C:\payload, which any user may create.
pub(crate) fn disk_payload() -> Option<PathBuf> {
let exe = env::current_exe().ok()?;
let d = exe.parent()?;
- [d.join("payload"), d.join(r"..\..\payload")].into_iter().find(|p| p.is_dir())
+ [Some(d.join("payload")), d.ends_with(r"target\release").then(|| d.join(r"..\..\payload"))].into_iter().flatten().find(|p| p.is_dir())
}
/// Unpacks the `need`ed bundled plugins, runs `f` on them, deletes them. The folder is under Program Files (admin-only writable),
@@ -123,9 +140,12 @@ pub(crate) fn install_plugin(i: usize) -> Result<String, String> {
pub(crate) fn uninstall_plugin(i: usize) -> Result<String, String> {
let p = &PLUGINS[i];
let (_, uninst) = p.actions.ok_or(t!("удаление недоступно", "uninstall is not available"))?;
+ WARN.lock().unwrap().clear();
uninst().inspect_err(|e| log(&tf!("{}: ОШИБКА удаления {e}", "{}: uninstall ERROR {e}", p.name)))?;
- log(&tf!("{}: удалён", "{}: removed", p.name));
- Ok(tf!("{} удалён, система восстановлена.", "{} removed, system restored.", p.name))
+ let w = WARN.lock().unwrap().clone();
+ log(&format!("{}: {} {}", p.name, t!("удалён", "removed"), w.join(" | ")));
+ let note = if w.is_empty() { String::new() } else { tf!(" Предупреждений: {} (см. %ProgramData%\\plugin-launcher\\install.log).", " Warnings: {} (see %ProgramData%\\plugin-launcher\\install.log).", w.len()) };
+ Ok(tf!("{} удалён, система восстановлена.{note}", "{} removed, system restored.{note}", p.name))
}
pub(crate) fn rollback() -> Result<String, String> {
diff --git a/src/install/search.rs b/src/install/search.rs
index 203efe7..17569bd 100644
--- a/src/install/search.rs
+++ b/src/install/search.rs
@@ -47,28 +47,27 @@ pub(crate) fn install() -> Result<(), String> {
}
pub(crate) fn uninstall() -> Result<(), String> {
- with_payload(&["rs.exe"], |src| {
- let _ = run("taskkill", &["/f", "/im", "rs-launcher.exe"]);
- let _ = run("reg", &["delete", r"HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "/v", "rs-launcher", "/f"]);
- // run the unpacked copy: an exe cannot delete itself, so the installed one would leave its folder behind
- run(src.join("rs.exe").to_str().unwrap(), &["--uninstall"])?;
- let _ = fs::remove_dir_all(prog_dir());
- let _ = run("reg", &["delete", SH_KEY, "/v", "Debugger", "/f"]);
- // no saved values (installed by an older launcher): the Windows defaults
- let mode = match (reg_dword(STATE, "WSearchStart"), reg_dword(STATE, "WSearchDelayed")) {
- (Some(2), Some(0)) => "auto",
- (Some(3), _) => "demand",
- (Some(4), _) => "disabled",
- _ => "delayed-auto",
- };
- run("sc.exe", &["config", "WSearch", "start=", mode])?;
- if mode.ends_with("auto") {
- let _ = run("sc.exe", &["start", "WSearch"]);
- }
- let r = taskbar_search(reg_dword(STATE, "SearchboxMode").unwrap_or(2));
- if r.is_ok() {
- let _ = run("reg", &["delete", STATE, "/f"]);
- }
- r
- })
+ let _ = run("taskkill", &["/f", "/im", "rs-launcher.exe"]);
+ let _ = run("reg", &["delete", r"HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "/v", "rs-launcher", "/f"]);
+ // Windows Search back first: a failure removing our files below must not leave it switched off
+ let _ = run("reg", &["delete", SH_KEY, "/v", "Debugger", "/f"]);
+ // no saved values (installed by an older launcher): the Windows defaults
+ let mode = match (reg_dword(STATE, "WSearchStart"), reg_dword(STATE, "WSearchDelayed")) {
+ (Some(2), Some(0)) => "auto",
+ (Some(3), _) => "demand",
+ (Some(4), _) => "disabled",
+ _ => "delayed-auto",
+ };
+ let svc = run("sc.exe", &["config", "WSearch", "start=", mode]);
+ if svc.is_ok() && mode.ends_with("auto") {
+ let _ = run("sc.exe", &["start", "WSearch"]);
+ }
+ let r = svc.and(taskbar_search(reg_dword(STATE, "SearchboxMode").unwrap_or(2)));
+ if r.is_ok() {
+ let _ = run("reg", &["delete", STATE, "/f"]);
+ }
+ // run the unpacked copy: an exe cannot delete itself, so the installed one would leave its folder behind
+ let files = with_payload(&["rs.exe"], |src| run(src.join("rs.exe").to_str().unwrap(), &["--uninstall"]));
+ let _ = fs::remove_dir_all(prog_dir());
+ r.and(files)
}
diff --git a/src/install/taskmgr.rs b/src/install/taskmgr.rs
index 164e9a6..ebbc82c 100644
--- a/src/install/taskmgr.rs
+++ b/src/install/taskmgr.rs
@@ -3,12 +3,23 @@ use crate::*;
pub(crate) const TM_KEY: &str = r"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe";
+/// Another replacement's Debugger (Process Explorer's "Replace Task Manager" writes the same value), saved once, put back on uninstall.
+pub(crate) const TM_STATE: &str = r"HKLM\SOFTWARE\plugin-launcher\rtaskmgr-win32";
+
+/// Ours only: a Debugger set by another program is not this plugin.
+pub(crate) fn tm_installed() -> bool {
+ reg_str(TM_KEY, "Debugger").is_some_and(|d| d.to_lowercase().contains("rtaskmgr"))
+}
+
pub(crate) fn tm_dir() -> PathBuf {
program_files().join("rtaskmgr")
}
// Image File Execution Options "Debugger": Windows starts our exe instead of taskmgr.exe (the system file stays untouched, so this is fully reversible).
pub(crate) fn tm_install() -> Result<(), String> {
+ if let Some(old) = reg_str(TM_KEY, "Debugger").filter(|_| !tm_installed() && reg_str(TM_STATE, "Debugger").is_none()) {
+ run("reg", &["add", TM_STATE, "/v", "Debugger", "/t", "REG_SZ", "/d", &old, "/f"])?;
+ }
with_payload(&["Task manager.exe", "rs-du.exe"], |d| {
let dst = tm_dir().join("rtaskmgr-win32.exe");
let _ = run("taskkill", &["/f", "/im", "rtaskmgr-win32.exe"]); // an update: a running exe cannot be overwritten
@@ -16,7 +27,7 @@ pub(crate) fn tm_install() -> Result<(), String> {
put(&d.join("Task manager.exe"), &dst)?;
put(&d.join("rs-du.exe"), &tm_dir().join("rs-du.exe"))?;
// the search (and the bar's Start panel) lists Start Menu shortcuts only, so without one the task manager is invisible to them
- soft(t!("ярлык в меню Пуск не создан, поиск не увидит диспетчер", "Start menu shortcut was not created, search will not find the task manager"), run("powershell", &["-NoProfile", "-Command", &format!("$s=(New-Object -ComObject WScript.Shell).CreateShortcut('{}'); $s.TargetPath='{}'; $s.Save()", tm_lnk().display(), dst.display())]));
+ soft(t!("ярлык в меню Пуск не создан, поиск не увидит диспетчер", "Start menu shortcut was not created, search will not find the task manager"), shortcut(&start_lnk("Task manager"), &dst, ""));
// elevated start without a UAC prompt (the exe re-launches itself through this task), so it can end protected processes
let task = format!("$u=[Security.Principal.WindowsIdentity]::GetCurrent().Name; Register-ScheduledTask -TaskName rtaskmgr -Force -Action (New-ScheduledTaskAction -Execute '{}') -Principal (New-ScheduledTaskPrincipal -UserId $u -LogonType Interactive -RunLevel Highest) -Settings (New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit ([TimeSpan]::Zero) -MultipleInstances Parallel) | Out-Null", dst.display());
soft(t!("задача rtaskmgr не создана, запуск от администратора будет через UAC", "rtaskmgr task was not created, launching as administrator will go through UAC"), run("powershell", &["-NoProfile", "-Command", &task]));
@@ -24,16 +35,17 @@ pub(crate) fn tm_install() -> Result<(), String> {
})
}
-pub(crate) fn tm_lnk() -> PathBuf {
- PathBuf::from(std::env::var("ProgramData").unwrap_or_else(|_| r"C:\ProgramData".into())).join(r"Microsoft\Windows\Start Menu\Programs\Task manager.lnk")
-}
-
pub(crate) fn tm_uninstall() -> Result<(), String> {
- let _ = fs::remove_file(tm_lnk());
+ let _ = fs::remove_file(start_lnk("Task manager"));
let _ = run("schtasks", &["/delete", "/tn", "rtaskmgr", "/f"]);
// registry first: with the exe gone, taskmgr.exe would not start at all. Only our value: the key may hold
- // other IFEO settings (e.g. mitigation policies) that are not ours to remove.
- run("reg", &["delete", TM_KEY, "/v", "Debugger", "/f"])?;
+ // other IFEO settings (e.g. mitigation policies) that are not ours to remove. The replacement found at install comes back.
+ match reg_str(TM_STATE, "Debugger") {
+ Some(old) => run("reg", &["add", TM_KEY, "/v", "Debugger", "/t", "REG_SZ", "/d", &old, "/f"])?,
+ None if tm_installed() => run("reg", &["delete", TM_KEY, "/v", "Debugger", "/f"])?,
+ None => {}
+ }
+ let _ = run("reg", &["delete", TM_STATE, "/f"]);
let _ = run("taskkill", &["/f", "/im", "rtaskmgr-win32.exe"]);
let _ = fs::remove_file(tm_dir().join("rtaskmgr-win32.exe"));
cleaner_release(bar_dir().join("topbar.exe").is_file());
diff --git a/src/install/tools.rs b/src/install/tools.rs
index 5308d57..4cf7e07 100644
--- a/src/install/tools.rs
+++ b/src/install/tools.rs
@@ -15,11 +15,6 @@ pub(crate) fn db_dir() -> PathBuf {
program_files().join("debloat")
}
-/// Start Menu shortcut: search and the bar's Start panel list Start Menu shortcuts only.
-pub(crate) fn start_lnk(name: &str) -> PathBuf {
- PathBuf::from(env::var("ProgramData").unwrap_or_else(|_| r"C:\ProgramData".into())).join(format!(r"Microsoft\Windows\Start Menu\Programs\{name}.lnk"))
-}
-
/// Copies `exe` out of the payload into `dir` (an update: the running copy is killed first) and adds the Start Menu shortcut `lnk`.
pub(crate) fn tool_install(exe: &str, dir: &Path, lnk: Option<&str>) -> Result<(), String> {
with_payload(&[exe], |d| {
@@ -28,7 +23,7 @@ pub(crate) fn tool_install(exe: &str, dir: &Path, lnk: Option<&str>) -> Result<(
let dst = dir.join(exe);
put(&d.join(exe), &dst)?;
if let Some(n) = lnk {
- soft(&tf!("ярлык «{n}» в меню Пуск не создан, поиск его не увидит", "Start menu shortcut '{n}' was not created, search will not find it"), run("powershell", &["-NoProfile", "-Command", &format!("$s=(New-Object -ComObject WScript.Shell).CreateShortcut('{}'); $s.TargetPath='{}'; $s.Save()", start_lnk(n).display(), dst.display())]));
+ soft(&tf!("ярлык «{n}» в меню Пуск не создан, поиск его не увидит", "Start menu shortcut '{n}' was not created, search will not find it"), shortcut(&start_lnk(n), &dst, ""));
}
Ok(())
})
diff --git a/src/main.rs b/src/main.rs
index 84c4354..fd44034 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -90,7 +90,7 @@ const PLUGINS: &[Plugin] = &[
name: "rtaskmgr-win32",
desc: Tr("Диспетчер задач на Rust. Заменяет стандартный: Ctrl+Shift+Esc и запуск taskmgr.exe открывают его.", "A task manager in Rust. Replaces the stock one: Ctrl+Shift+Esc and launching taskmgr.exe open it."),
warn: Tr("Стандартный диспетчер задач будет ЗАМЕНЁН: любой запуск taskmgr.exe откроет rtaskmgr-win32.", "The stock Task Manager will be REPLACED: any launch of taskmgr.exe opens rtaskmgr-win32."),
- installed: || run("reg", &["query", TM_KEY, "/v", "Debugger"]).is_ok(),
+ installed: tm_installed,
actions: Some((tm_install, tm_uninstall)),
settings: false,
bulk: true,
@@ -109,7 +109,7 @@ const PLUGINS: &[Plugin] = &[
Plugin {
name: "rust-explorer",
desc: Tr("Файловый менеджер на Rust вместо Проводника: папки и диски открываются в нём (Win+E тоже), рабочий стол рисует он сам. Обычный explorer.exe как оболочка ОТКЛЮЧАЕТСЯ. Нужен topbar.", "A Rust file manager instead of Explorer: folders and drives open in it (Win+E too), and it draws the desktop itself. The regular explorer.exe as the shell is DISABLED. Requires topbar."),
- warn: Tr("ОБЫЧНЫЙ Explorer будет ОТКЛЮЧЁН: после установки панель задач, рабочий стол и окна папок дают topbar и rust-explorer. Сначала установите topbar, без него не будет панели. Ещё для экономии RAM отключаются службы DiagTrack, PcaSvc, InventorySvc, lfsvc (геолокация), cbdhsvc (журнал буфера Win+V), DoSvc ставится вручную, службы svchost объединяются (полностью после перезагрузки); удаление плагина вернёт их. Если что-то пойдёт не так: Ctrl+Alt+Del, Диспетчер задач, Запустить новую задачу, explorer.exe; затем удалите плагин.", "The REGULAR Explorer will be DISABLED: after install, topbar and rust-explorer provide the taskbar, the desktop and folder windows. Install topbar first, without it there will be no bar. To save RAM the services DiagTrack, PcaSvc, InventorySvc, lfsvc (geolocation) and cbdhsvc (Win+V clipboard history) are also disabled, DoSvc is set to manual, and svchost services are merged (fully after a reboot); uninstalling the plugin restores them. If something goes wrong: Ctrl+Alt+Del, Task Manager, Run new task, explorer.exe; then uninstall the plugin."),
+ warn: Tr("ОБЫЧНЫЙ Explorer будет ОТКЛЮЧЁН: после установки панель задач, рабочий стол и окна папок дают topbar и rust-explorer. Сначала установите topbar, без него не будет панели. Ещё для экономии RAM отключаются службы PcaSvc, InventorySvc, lfsvc (геолокация), cbdhsvc (журнал буфера Win+V), DoSvc ставится вручную, службы svchost объединяются (полностью после перезагрузки); удаление плагина вернёт их. Если что-то пойдёт не так: Ctrl+Alt+Del, Диспетчер задач, Запустить новую задачу, explorer.exe; затем удалите плагин.", "The REGULAR Explorer will be DISABLED: after install, topbar and rust-explorer provide the taskbar, the desktop and folder windows. Install topbar first, without it there will be no bar. To save RAM the services PcaSvc, InventorySvc, lfsvc (geolocation) and cbdhsvc (Win+V clipboard history) are also disabled, DoSvc is set to manual, and svchost services are merged (fully after a reboot); uninstalling the plugin restores them. If something goes wrong: Ctrl+Alt+Del, Task Manager, Run new task, explorer.exe; then uninstall the plugin."),
installed: || rx_dir().join("rust-explorer.exe").is_file(),
actions: Some((rx_install, rx_uninstall)),
settings: false,