Fix path #2;Change package manager
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
18
scripts/Install-WinGet.ps1
Normal file
18
scripts/Install-WinGet.ps1
Normal file
@ -0,0 +1,18 @@
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
# None
|
||||
)
|
||||
|
||||
$InvokeRestMethodSplat = @{
|
||||
Uri = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
|
||||
Method = 'GET'
|
||||
}
|
||||
$InvokeWebRequestSplat = @{
|
||||
Uri = ((Invoke-RestMethod @InvokeRestMethodSplat).assets | Where-Object ${_.name -like '*.appxbundle'}).browser_download_url
|
||||
Out = "$env:temp\winget.appxbundle"
|
||||
}
|
||||
Invoke-WebRequest @InvokeWebRequestSplat
|
||||
|
||||
If (Test-Path -Path "$env:temp\winget.appxbundle") {
|
||||
& dism.exe /Online /Add-ProvisionedAppxPackage /PackagePath:"$env:temp\winget.appxbundle" /SkipLicense
|
||||
}
|
Reference in New Issue
Block a user