From bf43d4ae2ae036e8bd802cd25411427013f183f5 Mon Sep 17 00:00:00 2001 From: wenyongda Date: Thu, 11 Jun 2026 10:24:58 +0800 Subject: [PATCH] docs: add winget command not fix tool and winget proxy guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充安装winget命令未找到提示工具的步骤,以及新增winget代理使用的配置教程 --- source/_posts/PowerShell.md | 3 +++ source/_posts/Windows软件安装.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/source/_posts/PowerShell.md b/source/_posts/PowerShell.md index 809131e..3f33a5d 100644 --- a/source/_posts/PowerShell.md +++ b/source/_posts/PowerShell.md @@ -541,6 +541,9 @@ Install-Module PSFzf -Scope CurrentUser -Force # 5. 安装 fzf 本体 winget install junegunn.fzf + +# 6. 安装 winget 命令未找到 提示工具 +Install-PSResource -Name Microsoft.WinGet.CommandNotFound ``` #### PowerShell 5.1 安装依赖 diff --git a/source/_posts/Windows软件安装.md b/source/_posts/Windows软件安装.md index 02cb7ae..25035d9 100644 --- a/source/_posts/Windows软件安装.md +++ b/source/_posts/Windows软件安装.md @@ -104,3 +104,33 @@ winget --proxy winget --no-proxy ``` +#### 使用代理 + +##### 命令行参数(单次使用) + +1. 开启配置(需要管理员权限) + +```powershell +winget settings --enable ProxyCommandLineOptions +``` + +2. 使用 + +```powershell +winget install Git.Git --proxy http://127.0.0.1:10809 +``` + +##### 管理员配置(全局生效) + +开启配置(需要管理员权限) + +```powershell +winget settings set DefaultProxy http://127.0.0.1:10809 +``` + +关闭配置(需要管理员权限) + +```powershell +winget settings reset DefaultProxy +``` +