In support of these issues
https://excelfox.com/forum/showthrea...ge51#post12784 https://www.youtube.com/watch?v=dKM8ZScbic8&t=75s
Winget issues https://github.com/ChrisTitusTech/wi...770ae56d3b6e85
https://github.com/ChrisTitusTech/wi...b236f3ecf290db
06.07.2021 The Best Windows Utility ( second nice shade of grey GUI )
Code:Write-Host "Checking winget..." Try{ # Check if winget is already installed $er = (invoke-expression "winget -v") 2>&1 if ($lastexitcode) {throw $er} Write-Host "winget is already installed." } Catch{ # winget is not installed. Install it from the Github release Write-Host "winget is not found, installing it right now." $download = "https://github.com/microsoft/winget-cli/releases/download/v1.0.11692/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" $output = $PSScriptRoot + "\winget-latest.appxbundle" Write-Host "Dowloading latest release" Invoke-WebRequest -Uri $download -OutFile $output Write-Host "Installing the package" Add-AppxPackage -Path $output } Finally { # Start installing the packages with winget #Get-Content .\winget.txt | ForEach-Object { # iex ("winget install -e " + $_) #} }
The Ultimate Windows Utility Upgrade 29 09 2021
A commit a bit later by mrhaydendp to simplify a bit https://github.com/ChrisTitusTech/wi...0db?diff=splitCode:Write-Host "Checking winget..." Try{ # Check if winget is already installed $er = (invoke-expression "winget -v") 2>&1 if ($lastexitcode) {throw $er} Write-Host "winget is already installed." } Catch{ # winget is not installed. Install it from the Microsoft Store Write-Host "winget is not found, installing it right now." Start-Process "ms-appinstaller:?source=https://aka.ms/getwinget" $nid = (Get-Process AppInstaller).id Wait-Process -Id $nid } Finally { # Start installing the packages with winget #Get-Content .\winget.txt | ForEach-Object { # iex ("winget install -e " + $_) #} }
Code:Write-Host "Checking winget..." # Check if winget is installed if (Test-Path ~\AppData\Local\Microsoft\WindowsApps\winget.exe){ 'Winget Already Installed' } else{ # Installing winget from the Microsoft Store Write-Host "Winget not found, installing it now." Start-Process "ms-appinstaller:?source=https://aka.ms/getwinget" $nid = (Get-Process AppInstaller).Id Wait-Process -Id $nid Write-Host Winget Installed }




Reply With Quote
Bookmarks