diff --git a/Windows/Chocolatey/ChocolateyUpgrade.ps1 b/Windows/Chocolatey/ChocolateyUpgrade.ps1 index c46f555ce448045d65ec9186b20ee2968ca91969..40cd9dc16f1be594df3235a0071859415013880b 100644 --- a/Windows/Chocolatey/ChocolateyUpgrade.ps1 +++ b/Windows/Chocolatey/ChocolateyUpgrade.ps1 @@ -2,11 +2,6 @@ Upgrade programs with Chocolatey by running "choco upgrade -y all" at computer startup and nightly ======================================================================================================#> -<#== Set parameter at start ==#> -param ( - [bool]$EnableRandomDelay = $false -) - <#== Function to remove old log files ==#> function Remove-OldLogFiles { param ( @@ -57,13 +52,6 @@ $busyFlagContent = "Script: $scriptName`nStart Time: $startTime" New-Item -Path $busyFlagPath -ItemType File -Force > $null Set-Content -Path $busyFlagPath -Value $busyFlagContent > $null -<#== Apply random delay if enabled ==#> -if ($EnableRandomDelay) { - $randomDelay = Get-Random -Minimum 0 -Maximum 300 # Random delay between 0 and 300 seconds (5 minutes) - Write-Host "Applying random delay of $randomDelay seconds..." - Start-Sleep -Seconds $randomDelay -} - <#== Upgrade all Chocolatey packages ==#> Write-Host "Starting Chocolatey upgrade..." powershell.exe choco upgrade -y all