Downloads:
310,743
Downloads of v 0.1.0:
20,751
Last Update:
16 Dec 2024
Package Maintainer(s):
Software Author(s):
- bcurran3
Tags:
bcurran3 unofficial choco upgrade all cup config schtasks scheduled task- Software Specific:
- Software Site
- Software Source
- Software License
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
(unofficial) Choco Upgrade All at (Task)
- 1
- 2
- 3
0.1.0 | Updated: 16 Dec 2024
- Software Specific:
- Software Site
- Software Source
- Software License
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
310,743
Downloads of v 0.1.0:
20,751
Maintainer(s):
Software Author(s):
- bcurran3
(unofficial) Choco Upgrade All at (Task) 0.1.0
Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by bcurran3. The inclusion of bcurran3 trademark(s), if any, upon this webpage is solely to identify bcurran3 goods or services and not for commercial purposes.
- 1
- 2
- 3
Some Checks Have Failed or Are Not Yet Complete
Not All Tests Have Passed
Deployment Method: Individual Install, Upgrade, & Uninstall
To install (unofficial) Choco Upgrade All at (Task), run the following command from the command line or from PowerShell:
To upgrade (unofficial) Choco Upgrade All at (Task), run the following command from the command line or from PowerShell:
To uninstall (unofficial) Choco Upgrade All at (Task), run the following command from the command line or from PowerShell:
Deployment Method:
This applies to both open source and commercial editions of Chocolatey.
1. Enter Your Internal Repository Url
(this should look similar to https://community.chocolatey.org/api/v2/)
2. Setup Your Environment
1. Ensure you are set for organizational deployment
Please see the organizational deployment guide
2. Get the package into your environment
Option 1: Cached Package (Unreliable, Requires Internet - Same As Community)-
Open Source or Commercial:
- Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
- You can also just download the package and push it to a repository Download
-
Open Source
-
Download the package:
Download - Follow manual internalization instructions
-
-
Package Internalizer (C4B)
-
Run: (additional options)
choco download choco-upgrade-all-at --internalize --source=https://community.chocolatey.org/api/v2/
-
For package and dependencies run:
choco push --source="'INTERNAL REPO URL'"
- Automate package internalization
-
Run: (additional options)
3. Copy Your Script
choco upgrade choco-upgrade-all-at -y --source="'INTERNAL REPO URL'" [other options]
See options you can pass to upgrade.
See best practices for scripting.
Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.
If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:
choco upgrade choco-upgrade-all-at -y --source="'INTERNAL REPO URL'"
$exitCode = $LASTEXITCODE
Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
Exit 0
}
Exit $exitCode
- name: Install choco-upgrade-all-at
win_chocolatey:
name: choco-upgrade-all-at
version: '0.1.0'
source: INTERNAL REPO URL
state: present
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
chocolatey_package 'choco-upgrade-all-at' do
action :install
source 'INTERNAL REPO URL'
version '0.1.0'
end
See docs at https://docs.chef.io/resource_chocolatey_package.html.
cChocoPackageInstaller choco-upgrade-all-at
{
Name = "choco-upgrade-all-at"
Version = "0.1.0"
Source = "INTERNAL REPO URL"
}
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
package { 'choco-upgrade-all-at':
ensure => '0.1.0',
provider => 'chocolatey',
source => 'INTERNAL REPO URL',
}
Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.
4. If applicable - Chocolatey configuration/installation
See infrastructure management matrix for Chocolatey configuration elements and examples.
This package is exempt from moderation. While it is likely safe for you, there is more risk involved.
DO YOU WANT TO UPGRADE YOUR CHOCOLATEY PACKAGES EVERY DAY? OR MAYBE EVERY WEEK?
YOU JUST FOUND THE EASY WAY!
This package creates a Windows Scheduled Task to run "choco upgrade all -y" with enhanced options at a time and frequency you specify. And because sometimes package installations go wrong... it will also create a Windows Scheduled Task to run "taskkill /im choco.exe /f /t" to stop the Chocolatey (choco.exe) process and all child processes at a time you specify.
This package is a pseudo replacement for choco-upgrade-all-at-startup.
USAGE INSTRUCTIONS:
- You can do nothing and it will run at the set it and forget it time. :)
- You can manually run choco-upgrade-all from Command Prompt or PowerShell.
- You can manually click the Upgrade All Packages icon in the Chocolatey Start Menu group if you have choco-shortcuts-winconfig installed.
- You can manually run choco-install packagename from Command Prompt or PowerShell to install packages with your choco-upgrade-all-at settings.
INSTALL INSTRUCTIONS:
You can install choco-upgrade-all-at with multiple parameters to make it run "choco upgrade all -y" daily or weekly (Monthly is just not often enough!) at your preferred time. If you enter no parameters at all, choco-upgrade-all-at will default to run "choco upgrade all -y" at 2 AM every day and abort the process at 4 AM. When entering the TIME and ABORTTIME parameters, use "Military Time." When entering the DAILY or WEEKLY parameter you can actually use anything, "yes" just makes sense though. When using the WEEKLY parameter, DAYS are entered as MON, TUE, WED, THU, FRI, SAT, or SUN. Not entering the correct format will fail the install. Please see the examples below.
INSTALL EXAMPLES:
- choco install choco-upgrade-all-at --params "'/TIME:23:00'" - runs "choco upgrade all -y" daily (default) at 11 PM and aborts at 1 AM, ABORTTIME defaults to +2 hours.
- choco install choco-upgrade-all-at --params "'/DAILY:yes /TIME:04:00 /ABORTTIME:08:00'" - runs "choco upgrade all -y" daily at 4 AM and aborts it at 8 AM.
- choco install choco-upgrade-all-at --params "'/WEEKLY:yes /DAY:SUN /TIME:01:00'" - runs "choco upgrade all -y" every Sunday at 1 AM and aborts at 3 AM.
- choco install choco-upgrade-all-at --params "'/NOTASK:true'" - installs choco-upgrade-all.ps1/bat without the scheduled task.
CONFIGURATION INSTRUCTIONS:
Run choco-upgrade-all -EditConfig to enable enhanced options such as:
- automatically delete newly installed Desktop and Start Menu icons
- run pre and/or post processing scripts
- setting a default user profile
SEE THE RELEASE NOTES FOR MORE INFORMATION
$ErrorActionPreference = 'Stop'
#Requires -RunAsAdministrator
# choco-install.ps1 Copyleft 2021-2023 by Bill Curran AKA BCURRAN3
# LICENSE: GNU GPL v3 - https://www.gnu.org/licenses/gpl.html
# Open a GitHub issue at https://github.com/bcurran3/ChocolateyPackages/issues if you have suggestions for improvement.
Write-Host "Choco-Install.ps1 v0.0.7 (2023/05/10) - Install Chocolatey packages with enhanced options" -Foreground White
Write-Host "Copyleft 2021-2023 Bill Curran ([email protected]) - free for personal and commercial use`n" -Foreground White
# Verify ChocolateyToolsLocation was created by Get-ToolsLocation during install and is in the environment
if (!($env:ChocolateyToolsLocation)) {$env:ChocolateyToolsLocation = "$env:SystemDrive\tools"}
if (!(Test-Path "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.config")) {Write-Warning "Configuration not found. Please re-install.";throw}
# Import preferences from choco-upgrade-all.config
[xml]$ConfigFile = Get-Content "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.config"
$ConfigArguments = $ConfigFile.Settings.Preferences.ConfigArguments
$DebugLogging = $ConfigFile.Settings.Preferences.DebugLogging
$DeleteNewDesktopIcons = $ConfigFile.Settings.Preferences.DeleteNewDesktopIcons
$DeleteNewStartMenuIcons = $ConfigFile.Settings.Preferences.DeleteNewStartMenuIcons
$PreProcessScript = $ConfigFile.Settings.Preferences.PreProcessScript
$PostProcessScript = $ConfigFile.Settings.Preferences.PostProcessScript
$IconsDeleted=0
# Set Notepad++ as preferred editor/viewer
if (Test-Path $env:ChocolateyInstall\bin\notepad++.exe){
$Editor="notepad++.exe"
} else {
$Editor="notepad.exe"
}
# Easily edit the config file
if ($args -eq "-EditConfig") {
Write-Host " ** Editing contents of choco-upgrade-all.config." -Foreground Magenta
&$Editor "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.config"
return
}
# Run pre-processor if configured
if ($PreProcessScript){&$PreProcessScript}
# get existing Desktop and Start Menu icons
$UserDesktopIconsPre = Get-ChildItem -Path "$env:USERPROFILE\Desktop\*.lnk"
if ($UserDesktopIconsPre -eq $null) {$UserDesktopIconsPre=0}
$PublicDesktopIconsPre = Get-ChildItem -Path "$env:PUBLIC\Desktop\*.lnk"
if ($PublicDesktopIconsPre -eq $null) {$PublicDesktopIconsPre=0}
$UserStartMenuIconsPre = Get-ChildItem -Path "$env:AppData\Microsoft\Windows\Start Menu\Programs\*.lnk" -Recurse
if ($UserStartMenuIconsPre -eq $null) {$UserStartMenuIconsPre=0}
$PublicStartMenuIconsPre = Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows\Start Menu\*.lnk" -Recurse
if ($PublicStartMenuIconsPre -eq $null) {$PublicStartMenuIconsPre=0}
# Do the Chocolatey Humpty Hump
Start-Process -NoNewWindow -FilePath "$env:ChocolateyInstall\bin\choco.exe" -ArgumentList "install -y $ConfigArguments $args" -Wait
# get existing and new Desktop and Start Menu icons
$UserDesktopIconsPost = Get-ChildItem -Path "$env:USERPROFILE\Desktop\*.lnk"
if ($UserDesktopIconsPost -eq $null) {$UserDesktopIconsPost=0}
$PublicDesktopIconsPost = Get-ChildItem -Path "$env:PUBLIC\Desktop\*.lnk"
if ($PublicDesktopIconsPost -eq $null) {$PublicDesktopIconsPost=0}
$UserStartMenuIconsPost = Get-ChildItem -Path "$env:AppData\Microsoft\Windows\Start Menu\Programs\*.lnk" -Recurse
if ($UserStartMenuIconsPost -eq $null) {$UserStartMenuIconsPost=0}
$PublicStartMenuIconsPost = Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows\Start Menu\*.lnk" -Recurse
if ($PublicStartMenuIconsPost -eq $null) {$PublicStartMenuIconsPost=0}
# Delete new Desktop icons if configured to do so
if ($DeleteNewDesktopIcons -eq 'True'){
if ($UserDesktopIconsPre.count -ne '0' -and $UserDesktopIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($UserDesktopIconsPre) -DifferenceObject ($UserDesktopIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
}
}
if ($PublicDesktopIconsPre.count -ne '0' -and $PublicDesktopIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($PublicDesktopIconsPre) -DifferenceObject ($PublicDesktopIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
}
}
}
# Delete new Start Menu icons if configured to do so
if ($DeleteNewStartMenuIcons -eq 'True'){
if ($UserStartMenuIconsPre.count -ne '0' -and $UserStartMenuIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($UserStartMenuIconsPre) -DifferenceObject ($UserStartMenuIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
}
}
if ($PublicStartMenuIconsPre.count -ne '0' -and $PublicStartMenuIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($PublicStartMenuIconsPre) -DifferenceObject ($PublicStartMenuIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
}
}
}
# Run post-processor if configured
if ($PostProcessScript){&$PostProcessScript}
Write-Host "`n ** Choco-Install DELETED $IconsDeleted unwanted icon(s).`n" -ForegroundColor Magenta
Write-Host "Found Choco-Install.ps1 useful?" -ForegroundColor White
Write-Host "Buy me a beer at https://www.paypal.me/bcurran3donations" -ForegroundColor White
Write-Host "Become a patron at https://www.patreon.com/bcurran3" -ForegroundColor White
<?xml version="1.0"?>
<Settings>
<Preferences>
<ConfigArguments></ConfigArguments>
<DebugLogging>false</DebugLogging>
<DefaultUserProfile></DefaultUserProfile>
<DeleteNewDesktopIcons>false</DeleteNewDesktopIcons>
<DeleteNewStartMenuIcons>false</DeleteNewStartMenuIcons>
<StopCUAAfter></StopCUAAfter>
<PreProcessScript></PreProcessScript>
<PostProcessScript></PostProcessScript>
</Preferences>
</Settings>
<!--
#######################################################################################################################
# NOTE: All settings are disabled by default
# LEGEND:
# * ConfigArguments - Additional options and switches to pass to choco.exe; e.g. Run choco upgrade /? to view options.
# * DebugLogging - (True/False) Extra logging - EXPERIMENTAL
# * DefaultUserProfile - Default user profile to use when running as scheduled task; e.g. William, Robert, Benjamin (Look at C:\Users)
# * DeleteNewDesktopIcons - (True/False) Delete newly created Desktop icons, user and public, after choco upgrade all
# * DeleteNewStartMenuIcons - (True/False) Delete newly created Start Menu icons, user and public, after choco upgrade all
# * StopCUAAfter - Not implemented yet
# * PreProcessScript - Script to run before choco upgrade all; e.g. c:\scripts\beforechoco.bat
# * PostProcessScript - Script to run after choco upgrade all; e.g. c:\scripts\afterchoco.bat
#######################################################################################################################
-->
$ErrorActionPreference = 'Stop'
#Requires -RunAsAdministrator
# choco-upgrade-all.ps1 Copyleft 2021-2023 by Bill Curran AKA BCURRAN3
# LICENSE: GNU GPL v3 - https://www.gnu.org/licenses/gpl.html
# Open a GitHub issue at https://github.com/bcurran3/ChocolateyPackages/issues if you have suggestions for improvement.
Write-Host "Choco-Upgrade-All.ps1 v0.0.7 (2023/05/15) - Upgrade your Chocolatey packages with enhanced options" -Foreground White
Write-Host "Copyleft 2021-2023 Bill Curran ([email protected]) - free for personal and commercial use`n" -Foreground White
# Verify ChocolateyToolsLocation was created by Get-ToolsLocation during install and is in the environment
if (!($env:ChocolateyToolsLocation)) {$env:ChocolateyToolsLocation = "$env:SystemDrive\tools"}
if (!(Test-Path "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.config")) {Write-Warning "Configuration not found. Please re-install.";throw}
# Import preferences from choco-upgrade-all.config
[xml]$ConfigFile = Get-Content "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.config"
$ConfigArguments = $ConfigFile.Settings.Preferences.ConfigArguments
$DebugLogging = $ConfigFile.Settings.Preferences.DebugLogging
$DefaultUserProfile = $ConfigFile.Settings.Preferences.DefaultUserProfile
$DeleteNewDesktopIcons = $ConfigFile.Settings.Preferences.DeleteNewDesktopIcons
$DeleteNewStartMenuIcons = $ConfigFile.Settings.Preferences.DeleteNewStartMenuIcons
#$StopCUAAfter = $ConfigFile.Settings.Preferences.StopCUAAfter # Not implemented yet
$PreProcessScript = $ConfigFile.Settings.Preferences.PreProcessScript
$PostProcessScript = $ConfigFile.Settings.Preferences.PostProcessScript
$IconsDeleted=0
# Set Notepad++ as preferred editor/viewer
if (Test-Path $env:ChocolateyInstall\bin\notepad++.exe){
$Editor="notepad++.exe"
} else {
$Editor="notepad.exe"
}
# Easily edit the config file
if ($args -eq "-EditConfig") {
Write-Host " ** Editing contents of choco-upgrade-all.config." -Foreground Magenta
&$Editor "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.config"
return
}
# Easily view the log file
if ($args -eq "-ViewLog") {
Write-Host " ** Viewing contents of choco-upgrade-all.log." -Foreground Magenta
&$Editor "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
return
}
# Logging - always logging
if (Test-Path "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"){
$LogSize=(Get-ChildItem -Path "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log").length
if ($LogSize -gt 40960) {
Remove-Item "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
Write-Output "$(Get-Date) Choco-Upgrade-All Deleted log file" >> "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
}
}
Write-Output "----------------------------------------------------------------------" >> "$ENV:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
Write-Output "$(Get-Date) Choco-Upgrade-All STARTED" >> "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
# add to log file
function Add2Log {
Param ( [string]$comment )
Write-Output "$(Get-Date) [INFO ] $comment" >> "$ENV:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
}
if ($DebugLogging){
Add2Log "CONFIG: DebugLogging is set to $DebugLogging. (ignored)"
} else {
Add2Log "CONFIG: DebugLogging is not set. (ignored)"
}
# Run pre-processor if configured
if ($PreProcessScript){
&$PreProcessScript
Add2Log "EXECUTED: $PreProcessScript"
}
# When running as SYSTEM (scheduled task) use the $DefaultUserProfile as the default user profile if defined
if ($DefaultUserProfile) {
$env:USERPROFILE="$env:SystemDrive\Users\$DefaultUserProfile"
$env:APPDATA="$env:SystemDrive\Users\$DefaultUserProfile\AppData\Roaming"
Add2Log "CONFIG: DefaultUserProfile is set to $DefaultUserProfile"
} else {
Add2Log "CONFIG: DefaultUserProfile is not set."
}
if ($ConfigArguments) {
Add2Log "CONFIG: ConfigArguments are set to $ConfigArguments"
} else {
Add2Log "CONFIG: ConfigArguments are not set."
}
# get existing Desktop and Start Menu icons
if (Test-Path "$env:USERPROFILE\Desktop") {$UserDesktopIconsPre = Get-ChildItem -Path "$env:USERPROFILE\Desktop\*.lnk"}
if ($UserDesktopIconsPre -eq $null) {$UserDesktopIconsPre=0}
if (Test-Path "$env:PUBLIC\Desktop") {$PublicDesktopIconsPre = Get-ChildItem -Path "$env:PUBLIC\Desktop\*.lnk"}
if ($PublicDesktopIconsPre -eq $null) {$PublicDesktopIconsPre=0}
if (Test-Path "$env:APPDATA\Microsoft\Windows\Start Menu\Programs") {$UserStartMenuIconsPre = Get-ChildItem -Path "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\*.lnk" -Recurse}
if ($UserStartMenuIconsPre -eq $null) {$UserStartMenuIconsPre=0}
if (Test-Path "$env:ProgramData\Microsoft\Windows\Start Menu") {$PublicStartMenuIconsPre = Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows\Start Menu\*.lnk" -Recurse}
if ($PublicStartMenuIconsPre -eq $null) {$PublicStartMenuIconsPre=0}
# Do the Chocolatey Humpty Hump
Start-Process -NoNewWindow -FilePath "$env:ChocolateyInstall\bin\choco.exe" -ArgumentList "upgrade all -y $ConfigArguments $args" -Wait
# Get existing and new Desktop and Start Menu icons
if (Test-Path "$env:USERPROFILE\Desktop") {$UserDesktopIconsPost = Get-ChildItem -Path "$env:USERPROFILE\Desktop\*.lnk"}
if ($UserDesktopIconsPost -eq $null) {$UserDesktopIconsPost=0}
if (Test-Path "$env:PUBLIC\Desktop") {$PublicDesktopIconsPost = Get-ChildItem -Path "$env:PUBLIC\Desktop\*.lnk"}
if ($PublicDesktopIconsPost -eq $null) {$PublicDesktopIconsPost=0}
if (Test-Path "$env:APPDATA\Microsoft\Windows\Start Menu\Programs") {$UserStartMenuIconsPost = Get-ChildItem -Path "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\*.lnk" -Recurse}
if ($UserStartMenuIconsPost -eq $null) {$UserStartMenuIconsPost=0}
if (Test-Path "$env:ProgramData\Microsoft\Windows\Start Menu") {$PublicStartMenuIconsPost = Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows\Start Menu\*.lnk" -Recurse}
if ($PublicStartMenuIconsPost -eq $null) {$PublicStartMenuIconsPost=0}
# Delete new Desktop icons if configured to do so
if ($DeleteNewDesktopIcons -eq 'True'){
Add2Log "CONFIG: DeleteNewDesktopIcons is set to TRUE"
if ($UserDesktopIconsPre.count -ne '0' -and $UserDesktopIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($UserDesktopIconsPre) -DifferenceObject ($UserDesktopIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
$IconsNew | % {Add2Log "DELETED: $_"}
}
}
if ($PublicDesktopIconsPre.count -ne '0' -and $PublicDesktopIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($PublicDesktopIconsPre) -DifferenceObject ($PublicDesktopIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
$IconsNew | % {Add2Log "DELETED: $_"}
}
}
} else {
Add2Log "CONFIG: DeleteNewDesktopIcons is set to FALSE"
}
# Delete new Start Menu icons if configured to do so
if ($DeleteNewStartMenuIcons -eq 'True'){
Add2Log "CONFIG: DeleteNewStartMenuIcons is set to TRUE"
if ($UserStartMenuIconsPre.count -ne '0' -and $UserStartMenuIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($UserStartMenuIconsPre) -DifferenceObject ($UserStartMenuIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
$IconsNew | % {Add2Log "DELETED: $_"}
}
}
if ($PublicStartMenuIconsPre.count -ne '0' -and $PublicStartMenuIconsPost.count -ne '0'){
$IconsNew = Compare-Object -ReferenceObject ($PublicStartMenuIconsPre) -DifferenceObject ($PublicStartMenuIconsPost) -PassThru
if ($IconsNew -ne $null) {
Remove-Item $IconsNew.fullname
$IconsDeleted=$IconsDeleted + $IconsNew.count
$IconsNew | % {Add2Log "DELETED: $_"}
}
}
} else {
Add2Log "CONFIG: DeleteNewStartMenuIcons is set to FALSE"
}
# Run post-processor if configured
if ($PostProcessScript){
&$PostProcessScript
Add2Log "EXECUTED: $PostProcessScript"
}
if (($DeleteNewDesktopIcons -eq 'True') -or ($DeleteNewStartMenuIcons -eq 'True')){
Add2Log "DELETED $IconsDeleted unwanted shortcut(s)."
Write-Host "`n ** Choco-Upgrade-All DELETED $IconsDeleted unwanted shortcut(s).`n" -ForegroundColor Magenta
}
Write-Host "Found Choco-Upgrade-All.ps1 useful?" -ForegroundColor White
Write-Host "Buy me a beer at https://www.paypal.me/bcurran3donations" -ForegroundColor White
Write-Host "Become a patron at https://www.patreon.com/bcurran3" -ForegroundColor White
Write-Output "$(Get-Date) Choco-Upgrade-All FINISHED" >> "$env:ChocolateyToolsLocation\BCURRAN3\choco-upgrade-all.log"
$ErrorActionPreference = 'Stop'
$packageName = 'choco-upgrade-all-at'
$scriptDir = "$(Get-ToolsLocation)\BCURRAN3"
SchTasks /Delete /TN choco-upgrade-all-at /F
SchTasks /Delete /TN choco-upgrade-all-at-abort /F
if (!(Test-Path "$ENV:ChocolateyInstall\lib\choco-upgrade-all-at-startup")) {
Remove-Item "$ENV:ChocolateyInstall\bin\choco-upgrade-all.bat" -Force -ErrorAction SilentlyContinue
Remove-Item "$ENV:ChocolateyInstall\bin\choco-install.bat" -Force -ErrorAction SilentlyContinue
Remove-Item "$scriptDir\choco-upgrade-all.*" -Force -ErrorAction SilentlyContinue | Out-Null
$CTL=Get-ToolsLocation
if (!(Get-ChildItem -Path "$CTL\BCURRAN3" | Measure-Object | %{$_.Count})) {
$ENV:Path.Replace("$CTL\BCURRAN3","") | Out-Null
Remove-Item "$CTL\BCURRAN3" | Out-Null
}
}
Log in or click on link to see number of positives.
In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).
Chocolatey Pro provides runtime protection from possible malware.
Add to Builder | Version | Downloads | Last Updated | Status |
---|---|---|---|---|
(unofficial) Choco Upgrade All at (Task) 0.1.0 | 20751 | Monday, December 16, 2024 | Exempted | |
(unofficial) Choco Upgrade All at (Task) 0.0.7 | 99289 | Tuesday, May 16, 2023 | Exempted | |
(unofficial) Choco Upgrade All at (Task) 0.0.6 | 141804 | Tuesday, March 16, 2021 | Approved | |
(unofficial) Choco Upgrade All at (Task) 0.0.5 | 44573 | Sunday, May 6, 2018 | Approved | |
(unofficial) Choco Upgrade All at (Task) 0.0.4.1 | 720 | Tuesday, April 24, 2018 | Approved | |
(unofficial) Choco Upgrade All at (Task) 0.0.4 | 361 | Sunday, April 22, 2018 | Approved | |
(unofficial) choco upgrade all at (Task) 0.0.3 | 2326 | Friday, August 18, 2017 | Approved | |
choco (unofficial) upgrade all at (midnight?) (Task) 0.0.2 | 628 | Wednesday, May 24, 2017 | Approved |
public domain
A NOTE ON DEFAULTS:
- If you don't specify any parameters, choco-upgrade-all-at defaults to running daily at 2AM and aborting at 4 AM. (My preference!)
- Not specifying a TIME will randomize a default time between 2:10 and 2:50 AM. Not specifying an ABORTTIME will always default to TIME +2 hours.
- When WEEKLY is specified but a DAY isn't, default first run will be a week from installation date; i.e. next week on whatever day of the week you installed the package.
IF UPGRADING FROM A VERSION EARLIER THAN 0.0.4:
Your old scheduled task will be deleted and replaced with default (mentioned above) parameters. To ensure choco-upgrade-all-at runs when you want it to, you should uninstall and reinstall with the settings you prefer.
I have not tested with useRememberedArgumentsForUpgrades, you might get daily still with your preferred time.
IF UPGRADING FROM VERSION 0.0.4 or 0.0.4.1:
You're old scheduled task will be kept. You will need to uninstall and re-install to take advantage of the new ABORTTIME feature.
IF UPGRADING FROM A VERSION EARLIER THAN 0.0.6:
It is HIGHLY advised you read the Release Notes/ChangeLog and run choco-upgrade-all -EditConfig to enable the new enhanced features.
CHANGELOG:
- 0.1.0 - Randomized the default runtime so the it can now be between 2:10 and 2:50 rather than always being 2:00.
- 0.0.7 - Fixed bug causing an error when there was no pre-existing icons when using the delete new icons feature, added detailed logging, added -ViewLog option, added report
- 0.0.6 - Fixed wrong command in scheduled task. Added option to automatically delete newly created Desktop and Start Menu icons. Added option to run pre and post processing scripts. Added configurable arguments. Added ability to set default user profile. Edit C:\tools\BCURRAN3\choco-upgrade-all.config to enable the enhanced options. You can now run choco-upgrade-all from the command line to take advantage of these enhanced options. Added choco-install script which also uses the enhanced options. Added -EditConfig option to edit the config file. Changed default ABORTTIME to be TIME +2 hours.
- 0.0.5 - Added abort stuck upgrades feature. "Um, why do I want this?" you're thinking. You want this because sometimes background package installations go wrong. "Go wrong?" you're thinking. Yes, there are a couple scenarios where a Chocolatey package installation/upgrade can hang: if a package needs input, if an AutoHotKey or AutoIt script fails, and all those times a program installer pops up a browser window to tell you "Thank you." These scenarios leave hung processes in the background with no way for you to easily interact with them (They're in the background!). This means they are taking up memory resources for no reason and might cause problems installing other packages or programs. If you knew there was a hung process, you could manually stop the task, but who wants to check every day? This will automate checking and stopping any Chocolatey package hung tasks at the time you specify. I recommend setting it to a time an hour or two after you run your updates.
- 0.0.4.1 - Fixed compatibility with Windows 7 and 8 machines by using SchTasks.exe for everything and not using the Windows 10/Server 2016 only Get-ScheduledTask cmdlet. Removed PowerShell v4/v5 dependency.
- 0.0.4 - Added option to run weekly.
ROADMAP
-
- Move the ABORTTIME feature into the config file; i.e. Start-Job, Start-Sleep ABORTIME, Stop-Job
-
- chocolatey-core.extension (≥ 1.1.0)
Ground Rules:
- This discussion is only about (unofficial) Choco Upgrade All at (Task) and the (unofficial) Choco Upgrade All at (Task) package. If you have feedback for Chocolatey, please contact the Google Group.
- This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
- The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
- Tell us what you love about the package or (unofficial) Choco Upgrade All at (Task), or tell us what needs improvement.
- Share your experiences with the package, or extra configuration or gotchas that you've found.
- If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.