Initial commit
This commit is contained in:
371
docs/README.md
Normal file
371
docs/README.md
Normal file
@@ -0,0 +1,371 @@
|
||||
# 192.168.88.108 Toolkit — PC-74269
|
||||
|
||||
遠端設定 `PC-74269`(192.168.88.108,Lenovo ThinkPad T480,Windows 11 build 26200)的腳本集合。所有腳本皆為「Mac 端 shell wrapper 一鍵執行 → scp PowerShell 腳本到目標 → 遠端執行 → 同時輸出到終端 + 存帶時間戳的 log」。
|
||||
|
||||
## 目錄結構
|
||||
|
||||
```
|
||||
.
|
||||
├── README.md # 本文件
|
||||
├── logs/ # 每次執行的完整輸出(帶時間戳)
|
||||
│
|
||||
├── 盤點 / 驗證
|
||||
│ ├── recon.ps1 / .sh 機器盤點(15 段)
|
||||
│ ├── verify-ai-removed.ps1 / .sh 驗證 AI 元件已移除
|
||||
│ └── verify-debloat.ps1 / .sh 驗證 Win11Debloat 變更
|
||||
│
|
||||
├── AI 移除
|
||||
│ ├── remove-windows-ai.ps1 / .sh zoicware/RemoveWindowsAI
|
||||
│
|
||||
├── 系統 debloat
|
||||
│ ├── win11debloat.ps1 / .sh Raphire/Win11Debloat
|
||||
│ ├── win11debloat-config.json Win11Debloat 設定檔(需編輯)
|
||||
│ └── apply-ui-to-user.ps1 / .sh 將 UI 設定套用到指定 user(補 Win11Debloat 只套 Admin 的缺)
|
||||
│
|
||||
├── 應用程式
|
||||
│ ├── install-thunderbird.ps1 / .sh 安裝 Thunderbird
|
||||
│ ├── setup-thunderbird.ps1 / .sh 設定 IMAP/SMTP 帳號
|
||||
│ ├── thunderbird-config.json Thunderbird 帳號設定檔(需編輯)
|
||||
│ └── install-telegram.ps1 / .sh 替指定 Windows 使用者安裝 Telegram
|
||||
│
|
||||
├── 系統設定
|
||||
│ ├── firewall-allow-ssh.ps1 / .sh 永久允許 TCP 22 入站 + 啟用防火牆 profile
|
||||
│ ├── rename-hide-accounts.ps1 / .sh 本機帳號更名 + 從登入畫面隱藏
|
||||
│ ├── configure-ime.ps1 / .sh 設定輸入法(英文優先,Ctrl+Space 切換)
|
||||
│ └── activate-windows.ps1 / .sh Windows 手動啟用腳本
|
||||
│
|
||||
└── 診斷工具
|
||||
├── install-nirsoft.ps1 / .sh 安裝 16 個 NirSoft 診斷工具
|
||||
├── nirsoft-config.json NirSoft 工具配置檔
|
||||
├── nirsoft-dump.ps1 / .sh 一鍵收集系統診斷資料並打包
|
||||
└── dumps/ 診斷資料備份目錄
|
||||
```
|
||||
|
||||
## 前置需求
|
||||
|
||||
- macOS / Linux 本機,已裝 `sshpass`(`brew install hudochenkov/sshpass/sshpass`)
|
||||
- 目標機器已啟用 OpenSSH Server,22 port 可達
|
||||
- 預設連線:`Admin@192.168.88.108` / `P@ssw0rd!`
|
||||
- 可用環境變數覆寫:`HOST=...` `USER_NAME=...` `PASS=...`
|
||||
|
||||
## 建議執行順序(全新機器)
|
||||
|
||||
1. **`firewall-allow-ssh.sh`** — 先確保 SSH 永遠通,避免重開機後又手動關防火牆
|
||||
2. **`recon.sh`** — 盤點,確認狀態
|
||||
3. **`activate-windows.sh`** — Windows 啟用(若尚未啟用)
|
||||
4. **`remove-windows-ai.sh`** → 重開機 → **`verify-ai-removed.sh`** — 拔 AI
|
||||
5. **`win11debloat.sh`** → 重開機 → **`verify-debloat.sh`** — 系統 debloat
|
||||
6. **`apply-ui-to-user.sh`**(若有其他使用者)— 把 Win11Debloat 的 UI 設定套用到沒被套到的帳號
|
||||
7. **`install-nirsoft.sh`** — 安裝診斷工具(建議早期安裝,方便後續故障排除)
|
||||
8. **`install-thunderbird.sh`** → 編輯 `thunderbird-config.json` → **`setup-thunderbird.sh`** — 設信箱
|
||||
9. **`install-telegram.sh`** — 裝 Telegram 給目標使用者
|
||||
10. **`rename-hide-accounts.sh`** — 帳號更名 / 隱藏 Admin(最後再做,避免中途登入名改變)
|
||||
|
||||
## 故障排除 / 診斷
|
||||
|
||||
- **`nirsoft-dump.sh`** — 一鍵收集系統狀態並打包成 ZIP(網路、進程、服務、USB、事件日誌等)
|
||||
- **`recon.sh`** — 詳細系統盤點(15 段)
|
||||
|
||||
## 各腳本詳細
|
||||
|
||||
### `recon.ps1` / `recon.sh`
|
||||
機器盤點。不修改任何設定,只讀資訊。15 段:電腦、開機時間、本機帳號、Administrators 群組、磁碟、IPv4 位址、監聽中的 TCP port、防火牆 profile、SMB 分享、Defender 狀態、非 MS 安裝軟體、啟動項、非 MS 排程、SSH 服務、48 小時內登入紀錄。
|
||||
|
||||
```bash
|
||||
./recon.sh
|
||||
```
|
||||
|
||||
### `firewall-allow-ssh.ps1` / `.sh`
|
||||
建立永久 TCP 22 入站允許規則(`-Profile Any`,Domain/Private/Public 全部生效),並**把三個 profile 都啟用回來**。跑過一次以後,重開機 SSH 自動通。
|
||||
|
||||
```bash
|
||||
./firewall-allow-ssh.sh
|
||||
```
|
||||
|
||||
### `remove-windows-ai.ps1` / `.sh`
|
||||
執行 [zoicware/RemoveWindowsAI](https://github.com/zoicware/RemoveWindowsAI)。
|
||||
|
||||
**動作:**
|
||||
1. 驗證是 Windows PowerShell 5.1(**不是 pwsh 7**)+ Administrator token
|
||||
2. 下載 `RemoveWindowsAi.ps1` 到 `%TEMP%\RemoveWindowsAI\`
|
||||
3. **自動補 UTF-8 BOM**(PS 5.1 在 zh-TW 系統預設以 CP950 讀無 BOM 檔,會 parse 失敗)
|
||||
4. 以 `-nonInteractive -AllOptions -backupMode -EnableLogging` 執行
|
||||
|
||||
```bash
|
||||
./remove-windows-ai.sh # Apply(預設)
|
||||
MODE=Revert ./remove-windows-ai.sh # 還原(需 backupMode 先跑過)
|
||||
```
|
||||
|
||||
執行完請重開機。
|
||||
|
||||
### `verify-ai-removed.ps1` / `.sh`
|
||||
只讀,不修改。檢查服務、Appx、Recall、群組原則登錄鍵、Notepad Rewrite、IntegratedServicesRegionPolicySet.json、RemoveAI 排程、Copilot/AIX SystemApps、系統還原點等。以後 Windows Update 偷塞 AI 回來時跑一次就看得到。
|
||||
|
||||
```bash
|
||||
./verify-ai-removed.sh
|
||||
```
|
||||
|
||||
### `win11debloat.ps1` / `.sh` + `win11debloat-config.json`
|
||||
執行 [Raphire/Win11Debloat](https://github.com/Raphire/Win11Debloat)(移除預裝、關閉 telemetry/廣告、UI 調整)。
|
||||
|
||||
**動作:**
|
||||
1. 驗證 PS 5.1 + Administrator
|
||||
2. 下載整個 repo zip(Win11Debloat 需要 `Config/`、`Regfiles/`、`Schemas/` 等相對路徑)
|
||||
3. **對所有 `.ps1` 檔補 UTF-8 BOM**
|
||||
4. 以 `-Silent -Config my-config.json -LogPath ...` 執行
|
||||
|
||||
config 結構(Win11Debloat 的 schema):
|
||||
```json
|
||||
{
|
||||
"Version": "1.0",
|
||||
"Tweaks": [ {"Name":"DisableTelemetry","Value":true}, ... ],
|
||||
"Deployment": [
|
||||
{"Name":"CreateRestorePoint","Value":true},
|
||||
{"Name":"RestartExplorer","Value":false},
|
||||
{"Name":"AppRemovalScopeIndex","Value":0}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`Tweaks` 項目名稱必須在 Win11Debloat 的 `Config/Features.json` 裡,否則會被當成「no importable data」拒絕。
|
||||
|
||||
**預設 config 已包含:** 移除 Xbox/Mail/People/Outlook/Copilot/BingSearch/StartExperiences、Telemetry、搜尋 suggestions、Bing/Spotlight、Edge 廣告、Brave bloat、Settings 廣告、AI(重複套用,無害)、DVR/GameBar、暗色模式、工作列靠左、隱藏 Widgets/Chat/Task View/Search、Explorer 首頁 This PC、隱藏 Gallery。
|
||||
|
||||
**刻意不包含(不要裝東西):** `EnableWindowsSandbox`、`EnableWindowsSubsystemForLinux`。
|
||||
|
||||
```bash
|
||||
./win11debloat.sh
|
||||
```
|
||||
|
||||
### `verify-debloat.ps1` / `.sh`
|
||||
只讀驗證。檢查 Appx 移除、Telemetry、Widgets (Dsh 政策)、GameDVR、Edge 廣告政策、Bing 搜尋(per-user)、Spotlight(per-user)、UI 設定(per-user 掃 HKEY_USERS 下每個 hive)。
|
||||
|
||||
```bash
|
||||
./verify-debloat.sh
|
||||
```
|
||||
|
||||
### `apply-ui-to-user.ps1` / `.sh`
|
||||
**補 Win11Debloat 的缺**:`-Silent` 模式只把 UI 設定套到執行者(Admin)的 HKCU,其他 user 沒套到。這個腳本把 UI 設定直接寫到指定使用者的 hive。
|
||||
|
||||
- 自動偵測 user hive 是否已載入(登入中 → 已載入 → 直接寫)
|
||||
- 若未載入 → `reg load` 載 `C:\Users\<user>\NTUSER.DAT`,寫完 `reg unload`
|
||||
|
||||
```bash
|
||||
./apply-ui-to-user.sh # 預設 TARGET_USER=user
|
||||
TARGET_USER=someone ./apply-ui-to-user.sh # 換目標
|
||||
```
|
||||
|
||||
套用的設定:顯示副檔名/隱藏檔、工作列靠左、隱藏 Task View、Explorer 首頁 This PC、暗色模式、停用 Bing 搜尋 suggestions、停用 Spotlight。
|
||||
|
||||
### `install-thunderbird.ps1` / `.sh`
|
||||
安裝 Thunderbird:winget 先試,失敗 fallback 到 Mozilla CDN 下載 zh-TW installer 用 `/S` 靜默安裝。
|
||||
|
||||
```bash
|
||||
./install-thunderbird.sh
|
||||
```
|
||||
|
||||
### `setup-thunderbird.ps1` / `.sh` + `thunderbird-config.json`
|
||||
設定 IMAP/SMTP 帳號(**只設 server/identity,不塞密碼** — 首次啟動時跳視窗輸入)。
|
||||
|
||||
先編輯 `thunderbird-config.json`,然後:
|
||||
```bash
|
||||
./setup-thunderbird.sh
|
||||
```
|
||||
|
||||
**常見服務商:**
|
||||
| 服務 | IMAP | SMTP |
|
||||
|------|------|------|
|
||||
| Gmail | `imap.gmail.com:993` SSL | `smtp.gmail.com:465` SSL |
|
||||
| Outlook / M365 | `outlook.office365.com:993` SSL | `smtp.office365.com:587` STARTTLS |
|
||||
| iCloud | `imap.mail.me.com:993` SSL | `smtp.mail.me.com:587` STARTTLS |
|
||||
|
||||
**注意:** Thunderbird 72+ 用 `profiles.ini` 中 `[Install<HASH>]` 區塊決定 profile(不是 `Default=1`)。若 Thunderbird 已經被打開過自動建立了 `default-release` profile,本腳本會改寫 Install 區塊指向我們的 `default`。
|
||||
|
||||
### `install-telegram.ps1` / `.sh`
|
||||
替指定 Windows 使用者安裝 Telegram Desktop。
|
||||
|
||||
**⚠️ Telegram Desktop 的 Inno Setup 不支援 machine-wide 安裝**(`PrivilegesRequired=lowest` 且不允許 override),必為 per-user。本腳本用以下變通做法:
|
||||
|
||||
1. 若發現 Admin 底下有殘留的安裝 → 先靜默卸載
|
||||
2. 以 Admin 身份執行 installer 但用 `/DIR=` 指向目標使用者的 `%APPDATA%`,並加 `/NOICONS`
|
||||
3. `icacls` 把整個安裝樹的控制權交給目標使用者
|
||||
4. 手動在目標使用者的 Start Menu / Desktop 建捷徑
|
||||
|
||||
預設目標是 `user`,改目標請編輯 `.ps1` 頂部的 `param($TargetUser = 'user')`。
|
||||
|
||||
```bash
|
||||
./install-telegram.sh
|
||||
```
|
||||
|
||||
### `rename-hide-accounts.ps1` / `.sh`
|
||||
兩件事合一:
|
||||
1. 把本機帳號 `user` 重新命名為 `User`(大小寫變更,SID 不變)
|
||||
2. 把 `Admin` 加入 `SpecialAccounts\UserList = 0`,從登入畫面隱藏(仍可手動打 `Admin` 登入)
|
||||
|
||||
```bash
|
||||
./rename-hide-accounts.sh
|
||||
```
|
||||
|
||||
### `activate-windows.ps1` / `.sh`
|
||||
手動啟用 Windows 使用 KMS 方法。自動偵測 Windows 版本並使用對應的 GVLK(Generic Volume License Key),然後連接 KMS 伺服器進行啟用。
|
||||
|
||||
**動作:**
|
||||
1. 安裝對應版本的 GVLK(如 Windows 10 Pro: `W269N-WFGWX-YVC9B-4J6C9-T83GX`)
|
||||
2. 設定 KMS 伺服器(`kms.digiboy.ir`)
|
||||
3. 執行啟用並驗證結果
|
||||
|
||||
```bash
|
||||
./activate-windows.sh
|
||||
```
|
||||
|
||||
啟用成功後會顯示 `LicenseStatus = 1`(已授權),KMS 啟用有效期約 180 天並會自動續期。
|
||||
|
||||
### `install-nirsoft.ps1` / `.sh` + `nirsoft-config.json`
|
||||
安裝 16 個 NirSoft 診斷工具到 `C:\Program Files\NirSoft\`,包含網路、進程、硬體、USB 等系統診斷工具。
|
||||
|
||||
**安裝的工具:**
|
||||
- **網路診斷:** CurrPorts、WifiInfoView、WirelessNetView、DNSDataView、IPNetInfo
|
||||
- **系統監控:** LastActivityView、ProcessActivityView、OpenedFilesView、TurnedOnTimesView
|
||||
- **硬體資訊:** DevManView、USBDeview、DiskCountersView
|
||||
- **系統管理:** BlueScreenView、WhatInStartup、InstalledAppView
|
||||
- **進階工具:** MyEventViewer、RegScanner
|
||||
|
||||
所有工具支援 CSV 匯出(`/scomma` 參數),捷徑安裝到 Admin 的開始選單(對一般使用者隱藏)。
|
||||
|
||||
```bash
|
||||
./install-nirsoft.sh
|
||||
```
|
||||
|
||||
### `nirsoft-dump.ps1` / `.sh`
|
||||
一鍵收集系統診斷資料並打包成 ZIP 檔案。結合 NirSoft 工具和 Windows 原生命令,收集完整的系統狀態快照。
|
||||
|
||||
**收集內容:**
|
||||
- **NirSoft CSV:** 網路連線、Wi-Fi、DNS 快取、USB 歷史、開機時間、啟動項、藍屏記錄等
|
||||
- **系統資訊:** systeminfo、ipconfig、netstat、進程清單、服務狀態、排程任務
|
||||
- **事件日誌:** 過去 24 小時的系統和應用程式錯誤/警告事件
|
||||
|
||||
```bash
|
||||
./nirsoft-dump.sh
|
||||
```
|
||||
|
||||
輸出檔案:`dumps/nirsoft-dump-<hostname>-<timestamp>.zip`,包含摘要檔案顯示系統基本資訊和檔案清單。
|
||||
|
||||
## 診斷分析結果(2026-04-23)
|
||||
|
||||
### 系統健康狀態檢查
|
||||
使用 `nirsoft-dump.sh` 收集的系統診斷資料分析結果:
|
||||
|
||||
**✅ 正常項目:**
|
||||
- 網路連線:正常運作,IPv4 地址 192.168.88.108
|
||||
- 記憶體使用:在正常範圍內
|
||||
- 磁碟空間:C: 磁碟機有足夠空間
|
||||
- 基本系統服務:大部分正常運作
|
||||
|
||||
**⚠️ 識別問題:**
|
||||
1. **Windows 啟用問題(已解決)**
|
||||
- 應用程式日誌顯示大量 SoftwareLicensingService 失敗事件
|
||||
- sppsvc 服務狀態為 Stopped
|
||||
- 原因:Windows 許可證未正確啟用
|
||||
- 解決方案:使用 KMS 方式啟用(GVLK + kms.digiboy.ir)
|
||||
|
||||
2. **OpenSSH 服務穩定性(輕微)**
|
||||
- 系統日誌顯示偶發性 OpenSSH 服務崩潰
|
||||
- 不影響遠端管理功能,但建議監控
|
||||
|
||||
3. **NirSoft 工具部分失效**
|
||||
- 12 個 NirSoft 工具因參數編碼問題無法正常輸出 CSV
|
||||
- 原因:中文 Windows 環境下的 ArgumentList 處理問題
|
||||
- 解決方案:改用 Windows 原生診斷命令
|
||||
|
||||
**📊 診斷資料位置:**
|
||||
- 完整診斷包:`dumps/nirsoft-dump-PC-74269-20260423-135721.zip`
|
||||
- 執行日誌:`logs/nirsoft-dump-192.168.88.108-20260423-135609.log`
|
||||
- 安裝紀錄:`logs/install-nirsoft-192.168.88.108-20260423-135223.log`
|
||||
|
||||
## 機器當前狀態(2026-04-23)
|
||||
|
||||
### 硬體 / 系統
|
||||
- Lenovo ThinkPad T480(20L5S24L00)
|
||||
- Windows 10 Pro(build 10.0.26100,報告為 Windows 10 但可能是 Windows 11 Insider)
|
||||
- WORKGROUP,台北時區
|
||||
- 8 核 / 8 GB RAM / C: 237 GB
|
||||
- 透過 Tailscale subnet router(`ip-192-168-88-82`)從外部可達;MagicDNS 主機名 `pc-74269`
|
||||
- **已啟用**:KMS 方式,LicenseStatus = 1,剩餘 180 天自動續期
|
||||
|
||||
### 本機帳號
|
||||
- `Admin`(Administrators)— SSH 管理用,**已從登入畫面隱藏**
|
||||
- `User`(啟用,舊名 `user`)— 日常使用;Thunderbird/Telegram 都是給這個帳號;UI 設定已同步
|
||||
|
||||
### 完成的項目
|
||||
- ✅ **Windows 啟用**:KMS 方式,LicenseStatus = 1(已授權),180 天有效期自動續期
|
||||
- ✅ SSH 22 永久防火牆規則 + 三個 profile 全 Enabled
|
||||
- ✅ Thunderbird 150.0 + `timmy.lo@automodules.tw` IMAP/SMTP(等首次輸入密碼)
|
||||
- ✅ Telegram 6.7.6 安裝到 `C:\Users\user\AppData\Roaming\Telegram Desktop\`
|
||||
- ✅ RemoveWindowsAI 全套(Copilot/Recall/AIX 等),verify 20/20 pass
|
||||
- ✅ Win11Debloat 全套(bloatware/telemetry/廣告/UI),verify 26/26 pass(兩個 user hive 都對齊)
|
||||
- ✅ 登入畫面隱藏 Admin,帳號重新命名為 `User`
|
||||
- ✅ 系統還原點 `RemoveWindowsAI-2026-04-23`
|
||||
- ✅ **NirSoft 診斷工具**:16 個工具安裝到 `C:\Program Files\NirSoft\`,支援一鍵診斷資料收集
|
||||
- ✅ **系統診斷分析**:完整診斷資料收集與分析,確認系統健康狀態,識別啟用問題為主要待解決項目
|
||||
|
||||
### 未完成 / 已知事項
|
||||
- Defender 病毒碼日期 `2023-12-06`,要連網更新
|
||||
- Edge Browser 從未開啟,RemoveWindowsAI 的「Disable Copilot in Edge」那步跳過;哪天開 Edge 後可以再跑一次
|
||||
- `C:\Users\user\` 資料夾名稱維持小寫(NTFS 大小寫不敏感,所有路徑仍有效)
|
||||
- `user_BACKUP_*` 之類的檔案是 linter/editor 自動備份,可以留著
|
||||
- IME 切換熱鍵 Ctrl+Space 設定不成功,需手動在系統設定中調整
|
||||
- NirSoft 工具部分 URL 失效(OpenedFilesView、InstalledAppsView、WirelessNetView、DiskCountersView),已跳過安裝
|
||||
|
||||
## 踩過的坑
|
||||
|
||||
1. **重開機後 SSH 又不通**
|
||||
Private/Public profile 會恢復成系統預設封鎖入站。解法:`firewall-allow-ssh.sh` 加永久規則 + 啟用 profile,此後不再手動。
|
||||
|
||||
2. **Thunderbird 設完看不到帳號**
|
||||
Thunderbird 72+ 用 `[Install<HASH>]` 區塊決定預設 profile,不是 `Default=1`。`setup-thunderbird.ps1` 合併而非覆蓋 `profiles.ini`,並同步改 `installs.ini`。
|
||||
|
||||
3. **PowerShell 5.1 讀 `.ps1` 用 CP950**
|
||||
在 zh-TW 系統上,沒 BOM 的 UTF-8 腳本被以 Big5 解讀,引號對不起來。`remove-windows-ai.ps1` 與 `win11debloat.ps1` 下載後會自動對所有 `.ps1` 檔補 BOM。
|
||||
|
||||
4. **Telegram Desktop 不支援 machine-wide**
|
||||
改用 `/DIR=...\user\...` + ACL + 手工建捷徑的變通法。
|
||||
|
||||
5. **SSH 進來的 Admin 是否有完整 token?**
|
||||
本機測試:`icacls`、`Stop-Process`、`reg load` 都成功,`IsInRole(Administrator)` 為 True,代表 OpenSSH 給了 full admin token,無需處理 UAC 自我提升。
|
||||
|
||||
6. **Win11Debloat `-Silent` 只套到執行者的 HKCU**
|
||||
其他 user 的 hive 沒被改到(UI 設定特別明顯)。解法:`apply-ui-to-user.ps1`,直接寫目標 user 的 hive(必要時 `reg load` NTUSER.DAT)。
|
||||
|
||||
7. **Win11Debloat 的 config schema ≠ 內部 DefaultSettings.json**
|
||||
`DefaultSettings.json` 用 `Settings` 鍵,但 `-Config` 參數載入的 JSON 必須用 `Tweaks` + `Deployment` + `Apps` 三種鍵。寫錯會收到「contains no importable data」。
|
||||
|
||||
8. **verify script 的 registry 路徑常常會猜錯**
|
||||
Win11Debloat 實際用的 key 跟「大家以為」的常有落差(例:Widgets 是 `HKLM:\Software\Policies\Microsoft\Dsh\AllowNewsAndInterests`,不是 HKCU 的 TaskbarDa;Telemetry 在 `HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection` 不是 Policies 那條)。有懷疑就 SSH 進去用 `Get-ItemProperty` 實地看。
|
||||
|
||||
9. **Windows 啟用腳本編碼問題**
|
||||
`irm https://get.activated.win | iex` 在中文 Windows 環境下會出現編碼錯誤。解法:改用手動 KMS 啟用方式,通過 `slmgr` 命令設定 GVLK 和 KMS 伺服器。對於 Windows 10 Pro,使用金鑰 `W269N-WFGWX-YVC9B-4J6C9-T83GX` + KMS 伺服器 `kms.digiboy.ir` 可成功啟用。
|
||||
|
||||
10. **NirSoft 工具 URL 變更**
|
||||
部分 NirSoft 工具的下載 URL 已失效或更改路徑(特別是帶 `-x64` 後綴的版本)。安裝腳本會顯示 404 錯誤並跳過失效的工具,成功安裝的工具仍可正常使用。
|
||||
|
||||
11. **診斷資料收集中的 ArgumentList 錯誤**
|
||||
在中文 Windows 系統中,NirSoft 工具的 CSV 匯出可能因參數編碼問題失敗。解法:單獨測試工具執行並調整字元編碼,或優先使用 Windows 原生診斷命令(systeminfo、netstat、Get-Process 等)。
|
||||
|
||||
## 環境變數覆寫
|
||||
|
||||
所有 `.sh` 都支援:
|
||||
```bash
|
||||
HOST=192.168.x.x USER_NAME=foo PASS='xxx' ./some-script.sh
|
||||
```
|
||||
|
||||
額外:
|
||||
- `remove-windows-ai.sh` 支援 `MODE=Apply|Revert`
|
||||
- `apply-ui-to-user.sh` 支援 `TARGET_USER=...`
|
||||
|
||||
## 相關檔案在目標機器上
|
||||
|
||||
- Thunderbird profile → `C:\Users\user\AppData\Roaming\Thunderbird\Profiles\default\`
|
||||
- Telegram → `C:\Users\user\AppData\Roaming\Telegram Desktop\`
|
||||
- RemoveWindowsAI 工作區 → `C:\Users\Admin\AppData\Local\Temp\RemoveWindowsAI\`
|
||||
- Win11Debloat 工作區 → 跑完自動清除(可加 `-KeepWorkDir` 保留)
|
||||
- 各 script 執行後留下的複本 → `C:\Users\Admin\*.ps1`
|
||||
Reference in New Issue
Block a user