Execute winget
script in a module
This commit is contained in:
parent
ee0104e1e4
commit
a99d91793b
|
@ -3,18 +3,19 @@ param(
|
|||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
||||
$null = New-Module {
|
||||
. "$PSScriptRoot/../../Scripts/Software.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
$xamlDownloadLink = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx";
|
||||
$downloadLink = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle";
|
||||
$file = New-TemporaryFile;
|
||||
$file = Rename-Item $file "$file.msixbundle" -PassThru;
|
||||
Invoke-WebRequest "$xamlDownloadLink" -OutFile "$file";
|
||||
Add-AppxPackage "$file";
|
||||
Invoke-WebRequest "$downloadLink" -OutFile "$file";
|
||||
Add-AppxPackage "$file";
|
||||
Remove-Item $file;
|
||||
};
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
$xamlDownloadLink = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx";
|
||||
$downloadLink = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle";
|
||||
$file = New-TemporaryFile;
|
||||
$file = Rename-Item $file "$file.msixbundle" -PassThru;
|
||||
Invoke-WebRequest "$xamlDownloadLink" -OutFile "$file";
|
||||
Add-AppxPackage "$file";
|
||||
Invoke-WebRequest "$downloadLink" -OutFile "$file";
|
||||
Add-AppxPackage "$file";
|
||||
Remove-Item $file;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue