Skip to content

Instantly share code, notes, and snippets.

View hbread00's full-sized avatar

Bread hbread00

View GitHub Profile
@hbread00
hbread00 / winget_package_to_path.ps1
Last active May 26, 2025 21:30
PowerShell script to add winget package path to environment variables PATH, only for portable packages
# Get user's Winget packages directory
$userProfile = [System.Environment]::GetFolderPath('UserProfile')
$wingetDir = Join-Path $userProfile "AppData\Local\Microsoft\WinGet\Packages"
$pathsToAdd = @()
Get-ChildItem -Path $wingetDir -Directory | ForEach-Object {
$packageDir = $_.FullName