mirror of
https://github.com/jprdonnelly/qseow-scripts.git
synced 2025-12-19 17:17:04 -05:00
32 lines
917 B
PowerShell
32 lines
917 B
PowerShell
# Install-Winget Version v1.0.11692
|
|
# Andreas Nick 2021
|
|
|
|
# From github
|
|
$WinGet_Link = 'https://github.com/microsoft/winget-cli/releases/download/v1.0.11692/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
|
|
$WinGet_Name = 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
|
|
|
|
$RepoName = 'AppPAckages'
|
|
$RepoLokation = $env:Temp
|
|
$Packagename = 'Winget'
|
|
|
|
$RepoPath = Join-Path $RepoLokation -ChildPath $RepoName
|
|
$RepoPath = Join-Path $RepoPath -ChildPath $Packagename
|
|
|
|
if(-not (Test-Path $RepoPath ))
|
|
{
|
|
New-Item $RepoPath -ItemType Directory -Force
|
|
}
|
|
|
|
|
|
if(-not (Test-Path (Join-Path $RepoPath -ChildPath $WinGet_Name )))
|
|
{
|
|
Invoke-WebRequest -useb $WinGet_Link -OutFile (Join-Path $RepoPath -ChildPath $WinGet_Name )
|
|
} else
|
|
{
|
|
Write-Information "The file $WinGet_Name already exist in the repo. Skip download"
|
|
}
|
|
|
|
#Install the Package
|
|
Add-AppPackage (Join-Path $RepoPath -ChildPath $WinGet_Name)
|
|
|