diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 24eb2a7a..38333fab 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -55,16 +55,16 @@ $null = New-Module { return; } - Invoke-Hook "Install-PSModules" -Fallback { - Install-Module -AcceptLicense -Force PSWindowsUpdate; - }; - if (Test-Path $env:PWSH_PATH) { attrib "-R" "$env:PWSH_PATH\*" /S /D; Remove-Item -Recurse -Force $env:PWSH_PATH; continue; } + Invoke-Hook "Install-PSModules" -Fallback { + Install-Module -AcceptLicense -Force PSWindowsUpdate; + }; + if (-not (Test-Command winget)) { . "$PSScriptRoot/../Software/winget/Manage.ps1"; continue;