<# .SCRIPTNAME WUC_Start.ps1 .AUTHOR Jere Hauhia .VERSION 1.0.0 .DATE 2025-10-28 .DESCRIPTION Launches the Windows User Copier script and provides a menu-driven interface. Downloads dependencies over HTTP and supports direct execution via PowerShell. .LICENSE MIT License – Free to use, modify, and distribute. No warranty provided. .NOTES - Designed for use with `irm https://scr.hauhia.xyz | iex` - Tested on Windows 10/11 environments - Requires internet access and PowerShell 5.1 or later #> # Is admin function Ensure-Admin { $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if (-not $isAdmin) { Write-Host "This script requires administrator privileges." -ForegroundColor Red Write-Host "Please run PowerShell as administrator." -ForegroundColor Yellow Write-Host "Press any key to exit..." $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") Stop-Process -Id $PID } } Ensure-Admin # Menu function Show-Menu { Clear-Host Write-Host "==========================================" -ForegroundColor Cyan Write-Host " Windows User Copier " -ForegroundColor Yellow Write-Host "==========================================" -ForegroundColor Cyan Write-Host "" Write-Host " [1] Run Windows User Copier" -ForegroundColor Green Write-Host " [2] Exit" -ForegroundColor Red Write-Host "" } # Menu loop do { Show-Menu $choice = Read-Host "Select an option (1-2)" switch ($choice) { '1' { Write-Host "`nLaunching Windows User Copier..." -ForegroundColor Yellow # Download script $copierUrl = "https://scr.hauhia.xyz/WindowsUserCopier.ps1" $copierScript = "$env:TEMP\WindowsUserCopier.ps1" try { Invoke-WebRequest -Uri $copierUrl -OutFile $copierScript -ErrorAction Stop . $copierScript } catch { Write-Host "Script download failed: $_" -ForegroundColor Red } } '2' { Write-Host "`nExiting. Goodbye!" -ForegroundColor Cyan Start-Sleep -Seconds 3 Stop-Process -Id $PID } default { Write-Host "`nInvalid selection. Please try again." -ForegroundColor Red } } } while ($true)