From 1eb9005f100baff9e3e1d52b4f1f2ff5e8dc1994 Mon Sep 17 00:00:00 2001 From: HenryYannis <247510158+HenryYannis@users.noreply.github.com> Date: Fri, 30 Oct 2026 09:36:54 +0000 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20=E4=B8=89=E8=AF=AD=20README=20+=20C?= =?UTF-8?q?I?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题:README 中英混在一起,仓库改名后链接还是 Remove-OfficePlus;Quick-Remove.bat 写成“全自动清理”,实际会先扫描再询问确认;覆盖范围表漏了 Software\Microsoft\OfficePLUS; CI 里没有 ruff/pytest,checkout/setup-python 还停在 v4/v5。 我的改动: - README 拆成 README.md(简体)、README.zh-Hant.md(繁體)、README.en.md(English),结构一致, 顶部语言切换;对照代码修正上述事实,链接统一为 HenryYannis/remove-officeplus。 - ci.yml 新增 ubuntu 上的 ruff(E9,F)、compileall、pytest;checkout 升到 v7.0.1、 setup-python 升到 v7.1.0(按 SHA 固定)。release.yml、e2e.yml 未动。 - 新增 tests/test_checks.py,用 pytest 跑 sync_rules --check、real_sample_check、gui_result_check。 测试:本地 ruff check --select E9,F、compileall、pytest 3 passed。 --- .github/workflows/ci.yml | 31 +++++- README.en.md | 228 +++++++++++++++++++++++++++++++++++++++ README.md | 227 +++++++++++++++++++------------------- README.zh-Hant.md | 228 +++++++++++++++++++++++++++++++++++++++ tests/test_checks.py | 29 +++++ 5 files changed, 623 insertions(+), 120 deletions(-) create mode 100644 README.en.md create mode 100644 README.zh-Hant.md create mode 100644 tests/test_checks.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f935f6f..5754712 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,31 @@ permissions: contents: read jobs: + python-lint: + name: Ruff、编译检查和 pytest + runs-on: ubuntu-latest + env: + PYTHONUTF8: "1" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: "3.12" + - name: 安装 ruff 和 pytest + run: | + python -m pip install --upgrade pip + pip install ruff==0.17.3 pytest==9.2.0 + - name: Ruff(语法错误、未定义名称、未使用的导入) + run: ruff check --select E9,F --target-version py38 . + - name: 所有 Python 文件都能编译 + run: python -m compileall -q main.py build_exe.py src scripts tests + - name: pytest + run: python -m pytest -v tests + powershell-lint: runs-on: windows-latest steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Run PSScriptAnalyzer shell: pwsh run: | @@ -25,9 +46,9 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: ${{ matrix.python-version }} - name: Install dependencies & package @@ -57,8 +78,8 @@ jobs: env: PYTHONUTF8: "1" steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.11" - name: 打包 diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..3145fb1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,228 @@ +# Remove-OfficePlus + +[简体中文](README.md) | [繁體中文](README.zh-Hant.md) | **English** + +One-click removal of the Microsoft OfficePLUS Office add-in, its background service and leftover files, with an automatic registry backup before anything is deleted. + +[![CI](https://github.com/HenryYannis/remove-officeplus/actions/workflows/ci.yml/badge.svg)](https://github.com/HenryYannis/remove-officeplus/actions/workflows/ci.yml) +[![Release](https://img.shields.io/github/v/release/HenryYannis/remove-officeplus)](https://github.com/HenryYannis/remove-officeplus/releases) +[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) +![Platform](https://img.shields.io/badge/Platform-Windows%2010%20%7C%2011-0078D6.svg?logo=windows) + +--- + +## What it removes + +Many people find "Microsoft OfficePLUS" (also shown as "微软 PPT 助手 / Office 助手") on their PC without remembering installing it. Removing it by hand usually runs into: + +1. **It can't be turned off**: you untick it in Word / Excel / PowerPoint options, and after restarting Office it is ticked again. +2. **It can't be deleted**: File Explorer says the file is in use. +3. **It comes back**: after deleting some files, the background service downloads or repairs them on the next boot. + +This tool cleans the whole chain, in this order: processes ➔ services ➔ registry (HKLM / HKCU / 32-bit / Click-to-Run Office) ➔ scheduled tasks ➔ cache folders. + +| Category | Target path / identifier | Action | +| :--- | :--- | :--- | +| **Background service** | `OfficePLUS Service`, plus any service whose program path points to `MSOfficePLUSService.exe` | Stopped and removed with `sc delete` | +| **Processes holding files** | `MSOfficePLUSService`, `OfficePLUS.AgentLauncher`, `DeepLink`, `OfficePLUS` (only when the program lives in an OfficePLUS folder) | Force-terminated | +| **System registry (64-bit)** | `HKLM:\Software\Microsoft\Office\\Addins\MSOfficePLUS` | Add-in removed | +| **System registry (32-bit)** | `HKLM:\Software\Wow6432Node\Microsoft\Office\\Addins\MSOfficePLUS` | Add-in removed | +| **User registry** | `HKCU:\Software\Microsoft\Office\\Addins\MSOfficePLUS` | Add-in removed | +| **Add-ins matched by pattern** | In all the locations above and in Click-to-Run Office's virtual registry: add-ins whose name, FriendlyName, Description or Manifest contains "OfficePLUS" | Add-in removed | +| **Program settings** | `Software\Microsoft\OfficePLUS` (HKLM, HKLM 32-bit, HKCU) | Removed | +| **Uninstall leftovers** | `...\CurrentVersion\Uninstall\MSOfficePLUS` (HKLM, HKLM 32-bit, HKCU) | Control Panel leftover key removed | +| **Scheduled tasks** | Tasks whose name or path contains "OfficePLUS" | Removed | +| **Install folders** | `%ProgramFiles%\Microsoft OfficePLUS`, `%ProgramFiles(x86)%\Microsoft OfficePLUS` | Removed | +| **Cache and settings** | `%ProgramData%\Microsoft OfficePLUS`
`OfficePLUS` and `Microsoft OfficePLUS` under `%LOCALAPPDATA%` and `%APPDATA%` | Removed | + +`` means Word, Excel, PowerPoint and Outlook. All rules live in [`src/remove_officeplus/rules.json`](src/remove_officeplus/rules.json), shared by the Python and PowerShell versions. + +Other features: + +- **Pattern matching**: besides the known names, it finds add-ins whose name or description contains "OfficePLUS" and services whose program points to `MSOfficePLUSService.exe`, so renamed copies are caught too. Other add-ins and services are never touched. +- **Desktop GUI**: a native window that shows scan status and results at a glance. +- **No dependencies**: a PowerShell script and a standalone exe; nothing to install on Windows 10 / 11. +- **Automatic elevation**: a UAC prompt appears when admin rights are needed. If you approve with a different admin account, it still cleans the signed-in user's data. +- **Look before you delete**: scan only (`-Scan` / `--scan`) and dry run (`--dry-run`). + +It targets OfficePLUS specifically. If you meet a new variant or a similar add-in, please open an Issue. + +--- + +## Download and quick start + +### Option 1: download the exe (recommended) + +1. Download the latest `Remove-OfficePlus-GUI-v.exe` (for example `Remove-OfficePlus-GUI-v1.3.0.exe`) from the [Releases page](https://github.com/HenryYannis/remove-officeplus/releases). If GitHub is unreachable, use the [mirror download page](https://files.xbkjz.cn/apps/officeplus/). The app shows its version in the bottom-right corner; the "下载最新版" (download latest) link opens that mirror page. +2. Double-click it and choose "Yes" in the UAC prompt. +3. Click "一键清理" (one-click clean). It cleans and then re-scans automatically. + +### Option 2: run online in PowerShell (no download) + +Press `Win + X`, open "Terminal" or "PowerShell", then paste and run: + +```powershell +irm https://raw.githubusercontent.com/HenryYannis/remove-officeplus/main/scripts/Remove-OfficePlus.ps1 | iex +``` + +The script scans and lists what it found first, and only cleans after you confirm. This command always runs the latest version in the repository; to read the script first, open the link above in a browser. + +### Option 3: double-click the bat file (offline) + +1. Download the source zip of this repository and extract it. +2. Double-click `Quick-Remove.bat` in the root folder. +3. Choose "Yes" in the UAC prompt. The script scans first and cleans after you confirm. + +### Option 4: Python + +Requires Python 3.8 or later: + +```bash +python main.py # start the GUI (default) +python main.py --scan # scan only +python main.py --dry-run # dry run: list what cleaning would delete, change nothing +python main.py --nuke # clean (lists the items and asks to confirm; add -f to skip) +python main.py --version # show the version +``` + +### Command-line options + +| PowerShell script | Python | What it does | +| :--- | :--- | :--- | +| (no arguments) | `--cli` | Scan, then ask whether to clean | +| `-Scan` | `--scan` | Scan only, change nothing | +| — | `--dry-run` | Dry run: list every item cleaning would delete, change nothing | +| `-Nuke` | `--nuke` | Clean. The Python version lists the items and asks to confirm first; both remind you to save if Office is running | +| `-Force` | `-f` / `--force` / `--yes` | Skip the confirmation and clean | +| — | `--gui` | Start the GUI | +| — | `--version` | Show the version | + +With no arguments, the Python version starts the GUI. + +> The app's interface and output are currently in Simplified Chinese only. + +--- + +## Safety: backup and restore + +- **Back up before deleting**: registry keys are exported to a `.reg` backup before they are deleted; a key whose backup fails is not deleted. After cleaning it re-scans and reports anything that could not be removed. +- **Where backups and logs go**: `Documents\Remove-OfficePlus 备份`. It holds the registry backup (`.reg`), a restore guide (`如何恢复.txt`) and one log per run (`清理日志__