little-helper

WinGet Setup PowerShell Script - Documentation

File: Setup-WinGet.ps1
Version: 2.5.2
Date: March 7, 2026
Status: โœ… Ready to Use


๐Ÿ“‹ OVERVIEW

The Setup-WinGet.ps1 PowerShell script provides an automated, comprehensive setup and configuration system for Windows Package Manager (WinGet) for use with My Little Helper.

What It Does:

โœ… Checks if WinGet is installed
โœ… Installs WinGet if missing (2 methods)
โœ… Configures WinGet sources
โœ… Verifies WinGet is working properly
โœ… Creates quick reference documentation
โœ… Provides troubleshooting guidance


๐Ÿš€ HOW TO RUN

Method 1: Right-Click (Easiest)

1. Right-click Setup-WinGet.ps1
2. Select "Run with PowerShell"
3. Click "Yes" when prompted for Administrator
4. Follow on-screen instructions

Method 2: PowerShell Window

# Open PowerShell as Administrator
# Navigate to project folder
cd "C:\Users\GreenHornet\IdeaProjects\My Little Helper"

# Run the script
.\Setup-WinGet.ps1

Method 3: From Windows Terminal

# Open Windows Terminal (Admin)
# Navigate to project folder
cd "C:\Users\GreenHornet\IdeaProjects\My Little Helper"

# Run the script
.\Setup-WinGet.ps1

๐Ÿ“Š SCRIPT FEATURES

8-Step Automated Setup Process

STEP 1: System Requirements Check

STEP 2: WinGet Installation Check

STEP 3: WinGet Installation (if needed)

STEP 4: WinGet Configuration

STEP 5: Functionality Verification

STEP 6: WinGet Information Display

STEP 7: Environment Configuration

STEP 8: Reference Documentation


๐ŸŽฏ INSTALLATION METHODS

Method 1: Microsoft Store (Primary)

- Opens Microsoft Store automatically
- User completes installation via Store UI
- Most reliable method
- Automatic updates via Store

Method 2: GitHub Direct (Fallback)

- Downloads latest WinGet release from GitHub
- Installs .msixbundle package
- Used if Microsoft Store method fails
- Manual download and installation

๐Ÿ“– QUICK REFERENCE FILE

The script creates WinGet_Quick_Reference.txt containing:

Contents:

Location:

C:\Users\GreenHornet\IdeaProjects\My Little Helper\WinGet_Quick_Reference.txt

๐Ÿ’ก USAGE SCENARIOS

Scenario 1: New System Setup

User has never used WinGet before:
  1. Run Setup-WinGet.ps1
  2. Script installs WinGet
  3. Configures sources
  4. Creates reference guide
  5. Ready to use My Little Helper

Scenario 2: Verify Existing Installation

User has WinGet but wants to verify:
  1. Run Setup-WinGet.ps1
  2. Script detects existing installation
  3. Updates sources and configuration
  4. Verifies functionality
  5. Creates reference guide

Scenario 3: Troubleshooting

WinGet not working properly:
  1. Run Setup-WinGet.ps1
  2. Script identifies issues
  3. Attempts to fix problems
  4. Re-configures if needed
  5. Provides error details

๐ŸŽจ COLOR-CODED OUTPUT

The script uses color-coding for clarity:

Color Meaning Example
๐ŸŸข Green Success โœ“ WinGet installed successfully
๐Ÿ”ด Red Error โœ— Administrator privileges required
๐ŸŸก Yellow Warning โš  PowerShell 5.0 or higher recommended
๐Ÿ”ต Blue Information โ„น Windows Version: 10.0.22631
๐Ÿ”ท Cyan Headers === STEP 1: Checking System Requirements ===

๐Ÿ”ง TECHNICAL DETAILS

Requirements:

PowerShell Functions:

Write-ColorOutput   # Colored console output
Write-Header        # Section headers
Write-Success       # Success messages
Write-Error         # Error messages
Write-Warning       # Warning messages
Write-Info          # Information messages
Test-WinGetInstalled # Check WinGet status

Error Handling:


โœ… VERIFICATION TESTS

The script performs these verification tests:

1. Version Test

winget --version
# Expected: v1.x.xxxx or similar

2. List Test

winget list --accept-source-agreements
# Expected: List of installed packages

3. Search Test

winget search "Microsoft.PowerShell"
# Expected: Search results with PowerShell

๐Ÿšจ TROUBLESHOOTING

If Script Fails:

โ€œScript cannot be loadedโ€ Error

# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# Then run script again
.\Setup-WinGet.ps1

โ€œNot running as Administratorโ€ Error

1. Right-click PowerShell
2. Select "Run as Administrator"
3. Navigate to project folder
4. Run script again

โ€œWinGet not found after installationโ€

1. Restart PowerShell
2. Run: Get-Command winget
3. If still not found, restart computer
4. Run script again

โ€œMicrosoft Store method failedโ€

Script automatically tries GitHub method
If both fail:
  1. Visit: https://aka.ms/getwinget
  2. Manual install from Store
  3. Run script again to verify

๐Ÿ“‹ OUTPUT FILES

Files Created by Script:

File Location Purpose
WinGet_Quick_Reference.txt Project root Command reference guide
Setup log Console output Installation details

Files NOT Created (Manual):


๐ŸŽฏ INTEGRATION WITH MY LITTLE HELPER

After Running Setup Script:

  1. Launch My Little Helper:
    Double-click START.bat
    
  2. Access Software Installer:
    Main Menu โ†’ Option 11
    
  3. Use WinGet Features: ``` Options 1-24 now fully functional
    • Install pre-configured packages (1-11)
    • Search packages (16)
    • Manage versions (19)
    • Check updates (20)
    • Update WinGet (23) ```

๐Ÿ“Š SUCCESS INDICATORS

Script Completed Successfully If:

โœ… โ€œSETUP COMPLETEโ€ header displayed
โœ… WinGet version shown
โœ… โ€œInstallation Status: Readyโ€ displayed
โœ… โ€œConfiguration: Completeโ€ displayed
โœ… WinGet_Quick_Reference.txt created
โœ… No red error messages


๐Ÿ”„ RE-RUNNING THE SCRIPT

Safe to Re-run:

When to Re-run:


๐Ÿ“– COMMAND EXAMPLES FROM REFERENCE

Common Commands Created in Reference File:

# Search
winget search Python

# Install
winget install --id=Microsoft.PowerShell

# List installed
winget list

# Check updates
winget upgrade

# Update all
winget upgrade --all

# Update specific
winget upgrade --id=Microsoft.PowerShell

# Uninstall
winget uninstall --id=FileZilla.FileZilla

# Package details
winget show --id=VideoLAN.VLC

# Update sources
winget source update

๐ŸŽ‰ BENEFITS

Why Use This Script:

  1. Automated Setup: No manual steps required
  2. Error Handling: Handles common issues automatically
  3. Verification: Ensures WinGet is working
  4. Documentation: Creates reference guide
  5. Idempotent: Safe to run multiple times
  6. Troubleshooting: Provides actionable error messages
  7. Integration: Designed for My Little Helper
  8. Comprehensive: Covers all setup aspects

๐Ÿ“ž SUPPORT

If You Need Help:

  1. Check Output: Script provides detailed status messages
  2. Review Reference: See WinGet_Quick_Reference.txt
  3. Verify Requirements: Windows 10+, Admin rights
  4. Check Internet: Required for installation
  5. Manual Install: Visit https://aka.ms/getwinget

Resources:


๐Ÿ† COMPLETION

After Successful Setup:

โœ… WinGet is installed and configured
โœ… Package sources are updated
โœ… Functionality is verified
โœ… Quick reference created
โœ… Ready to use with My Little Helper
โœ… All 24 Software Installer options functional


File: Setup-WinGet.ps1
Version: 2.5.2
Status: โœ… Production Ready
Date: March 7, 2026

Next Step: Run the script to set up WinGet! ๐Ÿš€