# Check if elevated If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Host "This script needs to be run As Admin" -foregroundColor red break } else { #Remove UAC prompts Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0 } try { winget --version Write-Host "Found Winget, Proceeding to install dependencies!" } catch { #winget not found, instsall $ProgressPreference = 'SilentlyContinue' Write-Host 'Installing Winget' Write-Information "Downloading WinGet and its dependencies..." Invoke-WebRequest -Uri "https://aka.ms/getwinget" -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle Invoke-WebRequest -Uri "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx Invoke-WebRequest -Uri "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx" -OutFile Microsoft.UI.Xaml.2.8.x64.appx Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle } $packages = @( "Valve.Steam", "VideoLAN.VLC", "Google.Chrome", "Spotify.Spotify", "Oracle.JavaRuntimeEnvironment", "Oracle.JDK.19", "Git.Git", "RARLab.WinRAR", "Microsoft.DotNet.SDK.8", "Microsoft.DotNet.Runtime.7", "Discord.Discord", "Microsoft.VisualStudioCode", "qBittorrent.qBittorrent" ) foreach ($id in $packages) { winget install --accept-package-agreements --accept-source-agreements --silent --id=$id -e } clear Write-Host "Finished installing packages." -foregroundColor green Write-Host "Opening Microsoft Activation Script" -foregroundColor yellow irm https://get.activated.win | iex pause