Downloads:

19,045

Downloads of v 2018.05.17:

261

Last Update:

5/17/2018

Package Maintainer(s):

Software Author(s):

  • Bill Curran

Tags:

bcurran3 choco unofficial package packages.config backup script cloud

(unofficial) Choco Package List Backup to Local and Cloud (Script)

This is not the latest version of (unofficial) Choco Package List Backup to Local and Cloud (Script) available.

2018.05.17 | Updated: 5/17/2018

Downloads:

19,045

Downloads of v 2018.05.17:

261

Maintainer(s):

Software Author(s):

  • Bill Curran

(unofficial) Choco Package List Backup to Local and Cloud (Script) 2018.05.17

This is not the latest version of (unofficial) Choco Package List Backup to Local and Cloud (Script) available.

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install (unofficial) Choco Package List Backup to Local and Cloud (Script), run the following command from the command line or from PowerShell:

>

To upgrade (unofficial) Choco Package List Backup to Local and Cloud (Script), run the following command from the command line or from PowerShell:

>

To uninstall (unofficial) Choco Package List Backup to Local and Cloud (Script), run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • 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://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

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade choco-package-list-backup -y --source="'STEP 3 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-package-list-backup -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure choco-package-list-backup installed
  win_chocolatey:
    name: choco-package-list-backup
    state: present
    version: 2018.05.17
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'choco-package-list-backup' do
  action    :install
  version  '2018.05.17'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: choco-package-list-backup,
    Version: 2018.05.17,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller choco-package-list-backup
{
   Name     = 'choco-package-list-backup'
   Ensure   = 'Present'
   Version  = '2018.05.17'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'choco-package-list-backup':
  provider => 'chocolatey',
  ensure   => '2018.05.17',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install choco-package-list-backup version="2018.05.17" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 5/17/2018.

Description

Screenshot of (unofficial) Choco Package List Backup to Local and Cloud (Script)

#choco-package-list-backup solves your Chocolatey migration and package re-installation problems!

choco-package-list-backup is a script I wrote that will backup the list of your currently installed Chocolatey packages and save them to a PACKAGES.CONFIG file. You can then use that PACKAGES.CONFIG file to re-install all your packages on another computer or even the same computer later if it crashes. "How can I re-install on the same computer if it crashed and I lost the PACKAGES.CONFIG file?" Thanks for asking! choco-package-list-backup backs up your package list locally and to multiple cloud services!

###FEATURES:

choco-package-list-backup supports saving PACKAGES.CONFIG to all of the following:

  • your local Documents folder
  • your Active Directory assigned HOMESHARE
  • Box
  • Dropbox Personal and Business
  • Google Drive and Drive File Stream
  • iCloudDrive
  • Microsoft OneDrive
  • NETGEAR ReadyCLOUD
  • Nextcloud
  • Resilio Sync
  • Seafile
  • TonidoSync
  • A custom location of your choice
  • more coming - Let me know what you want/need!

choco-package-list-backup runs on install to make sure you have backup(s) right now!

choco-package-list-backup supports copying InstChoco with the PACKAGES.CONFIG path for the fastest way ever to reinstall Chocolatey and your Chocolatey packages! (Or migrate!)

choco-package-list-backup supports backing up PERSISTENTPACKAGES.CONFIG if you are using choco-persistent-packages

choco-package-list-backup integrates with Chocolatey Shortcuts if installed.

choco-package-list-backup saves in computer (name) specific folders so you can backup your Chocolatey package list from multiple computers to the same cloud destination(s). No confusion over what computer gets what packages!

choco-package-list-backup is configurable. You can:

  • configure which locations you want or don't want to save to (default=all the locations found except the custom location)
  • configure to save package version information or not (default=false)
  • configure to append a date to the saved packages.config (default=false)
  • configure what folder to save to (default=ChocolateyPackageListBackup)
  • easily add a custom location by editing CustomPath and UseCustomPath in the .xml configuration file

choco-package-list-backup and choco-package-list-backup.xml are saved to Chocolatey's bin folder (\ProgramData\chocolatey\bin), so choco-package-list-backup is in your path.

###INSTRUCTIONS:

  • Edit \ProgramData\chocolatey\bin\choco-package-list-backup.xml to customize your backup(s). It's easy, there are comments.
  • From PowerShell, type CHOCO-PACKAGE-LIST-BACKUP.PS1 to backup your Chocolatey packages list.
  • From Command Prompt, type POWERSHELL CHOCO-PACKAGE-LIST-BACKUP.PS1 to backup your Chocolatey packages list.
  • From Windows, click Chocolatey Package List Backup in the Windows Start Menu or Package List Backup inside the Chocolatey folder if Chocolatey Shortcuts is installed.

If you find choco-package-list-backup useful, and I suspect you will, please consider donating: https://www.paypal.me/bcurran3donations

PACKAGE NOTES


tools\.SkipAutoUninstaller
 
tools\choco-package-list-backup-manual.bat
@echo off
powershell -NoProfile -ExecutionPolicy Bypass -Command %ChocolateyInstall%\bin\choco-package-list-backup.ps1


tools\choco-package-list-backup.ps1
# choco-package-list-backup.ps1 (to local and cloud) by Bill Curran
# I couldn't have done this without the list parsing from Ammaar Limbada found at https://gist.github.com/alimbada/449ddf65b4ef9752eff3
# LICENSE: GNU GPL v3 - https://www.gnu.org/licenses/gpl.html
# ROADMAP:
# Add other cloud services support by request
# Open to suggestions - open a GitHub issue please if you have a suggestion/request.
# CAN NOT save/get installed package parameters as they are encrypted :(

$CPLBver        = "2018.05.17" # Version of this script
$Date           = Get-Date -UFormat %Y-%m-%d

# Import preferences - see choco-package-list-backup.xml
[xml]$ConfigFile = Get-Content "$env:ChocolateyInstall\bin\choco-package-list-backup.xml"

$PackagesListFile = $ConfigFile.Settings.Preferences.PackagesListFile
$SaveFolderName = $ConfigFile.Settings.Preferences.SaveFolderName
$SaveVersions = $ConfigFile.Settings.Preferences.SaveVersions
$AppendDate = $ConfigFile.Settings.Preferences.AppendDate
$CustomPath = $ConfigFile.Settings.Preferences.CustomPath

$UseCustomPath = $ConfigFile.Settings.Preferences.UseCustomPath 
$UseDocuments = $ConfigFile.Settings.Preferences.UseDocuments
$UseHomeShare = $ConfigFile.Settings.Preferences.UseHomeShare 
$UseBox = $ConfigFile.Settings.Preferences.UseBox
$UseDropbox = $ConfigFile.Settings.Preferences.UseDropbox
$UseGoogleDrive = $ConfigFile.Settings.Preferences.UseGoogleDrive
$UseiCloudDrive = $ConfigFile.Settings.Preferences.UseiCloudDrive
$UseNextcloud = $ConfigFile.Settings.Preferences.UseNextcloud
$UseOneDrive = $ConfigFile.Settings.Preferences.UseOneDrive
$UseReadyCLOUD = $ConfigFile.Settings.Preferences.UseReadyCLOUD
$UseResilioSync = $ConfigFile.Settings.Preferences.UseResilioSync
$UseSeafile = $ConfigFile.Settings.Preferences.UseSeafile
$UseTonidoSync = $ConfigFile.Settings.Preferences.UseTonidoSync

# Check the path to save packages.config and create if it doesn't exist
Function Check-SaveLocation{
    $CheckPath = Test-Path $SavePath
  If ($CheckPath -match "False")
     {
      New-Item $SavePath -Type Directory -force | out-null
     }   
    }

# Copy persistentpackages.config if it exists to the same location as packages.config
Function Check-PPConfig{
    $CheckPPSource = Test-Path $Env:ChocolateyInstall\config\persistentpackages.config
	If ($CheckPPSource -match "True"){
	   Copy-Item $Env:ChocolateyInstall\config\persistentpackages.config $SavePath -force | out-null
	   Write-Host "$SavePath\persistentpackages.config SAVED!" -ForegroundColor green 
    }
  }
	
# Copy InstChoco.exe if it exists to the same location as packages.config for super duper easy re-installation
$InstChoco = "$Env:ChocolateyInstall\lib\instchoco\tools\InstChoco.exe" # location of InstChoco.exe if it exists
Function Check-InstChoco{
    $CheckICSource = Test-Path $InstChoco
	If ($CheckICSource -match "True"){
	   $CheckICDest = Test-Path $SavePath\InstChoco.exe
	   If ($CheckICDest -match "False")
	      {
	       Copy-Item $InstChoco $SavePath -force | out-null
		   Write-Host "$SavePath\InstChoco.exe SAVED!" -ForegroundColor green 
	      } else {
		    $ICSource = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($InstChoco).FileVersion
		    $ICDest = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$SavePath\InstChoco.exe").FileVersion
		    if ($ICSource -ne $ICDest)
		       {
		        Copy-Item $InstChoco $SavePath -force | out-null
		        Write-Host "$SavePath\InstChoco.exe SAVED!" -ForegroundColor green
			   }
	   }
    }
  }

# Write out the saved list of packages to packages.config
Function Write-PackageConfig{ 
    Check-SaveLocation
	Check-PPConfig
	Check-InstChoco
	if ($AppendDate -eq "True"){
	    $PackagesListFile = $PackagesListFile+"_$Date"
	}
    Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" >"$SavePath\$PackagesListFile"
    Write-Output "<packages>" >>"$SavePath\$PackagesListFile"
	if ($SaveVersions -match "True")
	   {
        choco list -lo -r -y | % { "   <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }>>"$SavePath\$PackagesListFile"
	   } else {
         choco list -lo -r -y | % { "   <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" />" }>>"$SavePath\$PackagesListFile"
		 }
    Write-Output "</packages>" >>"$SavePath\$PackagesListFile"
	Write-Host "$SavePath\$PackagesListFile SAVED!" -ForegroundColor green 
    }

Write-Host choco-package-list-backup.ps1 v$CPLBver - backup Chocolatey package list locally and to the cloud -ForegroundColor white
Write-Host "Copyleft 2018 Bill Curran ([email protected]) - free for personal and commercial use" -ForegroundColor white

# Backup Chocolatey package names to packages.config file in custom defined path you set in $CustomPath above in line 16
if ($UseCustomPath -match "True" -and (Test-Path $CustomPath))
   {
    $SavePath   = "$CustomPath\$SaveFolderName"
    Write-PackageConfig
   }
	
# Backup Chocolatey package names on local computer to packages.config file in the Documents folder
if ($UseDocuments -match "True" -and (Test-Path $Env:USERPROFILE\Documents))
   {
    $SavePath   = "$Env:USERPROFILE\Documents\$SaveFolderName"
    Write-PackageConfig
   }
   
# Backup Chocolatey package names on local computer to packages.config file in Box (Sync) directory if it exists
if ($UseBox -match "True" -and (Test-Path "$Env:USERPROFILE\Box Sync"))
   {
    $SavePath = "$Env:USERPROFILE\Box Sync\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }    
   
# Check for Dropbox paths (Thanks ebbek!)
if (Test-Path $Env:AppData\Dropbox\info.json)
{
    $DropboxPersonal = ((get-content $Env:AppData\Dropbox\info.json) -join '`n' | ConvertFrom-json).personal.path
    $DropboxBusiness = ((get-content $Env:AppData\Dropbox\info.json) -join '`n' | ConvertFrom-json).business.path
}
elseif (Test-Path $Env:LocalAppData\Dropbox\info.json)
{
    $DropboxPersonal = ((get-content $Env:LocalAppData\Dropbox\info.json) -join '`n' | ConvertFrom-json).personal.path
    $DropboxBusiness = ((get-content $Env:LocalAppData\Dropbox\info.json) -join '`n' | ConvertFrom-json).business.path
}

# Backup Chocolatey package names on local computer to packages.config file in Personal Dropbox directory if it exists
if ($UseDropbox -match "True" -and ($DropboxPersonal) -and (Test-Path $DropboxPersonal))
   {
    $SavePath = "$DropboxPersonal\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }
   
# Backup Chocolatey package names on local computer to packages.config file in Business Dropbox directory if it exists
if ($UseDropbox -match "True" -and ($DropboxBusiness) -and (Test-Path $DropboxBusiness))
   {
    $SavePath = "$DropboxBusiness\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }
   
# Backup Chocolatey package names on local computer to packages.config file in Google Drive/Backup and Sync directory if it exists
if ($UseGoogleDrive -match "True" -and (Test-Path "$Env:USERPROFILE\Google Drive"))   
   {
    $SavePath = "$Env:USERPROFILE\Google Drive\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }
   
# Backup Chocolatey package names on local computer to packages.config file in Google Drive FS "My Drive" directory if it exists  (Thanks ebbek!)
$GFSInstalled=(test-path -path HKCU:Software\Google\DriveFS\Share)
if ($GFSInstalled)
   {
    $GoogleFSmountpoint = (Get-ItemProperty -path Registry::HKEY_CURRENT_USER\Software\Google\DriveFS\Share).MountPoint
    if ($UseGoogleDrive -match "True" -and ($GoogleFSmountpoint) -and (Test-Path "${GoogleFSmountpoint}:\My Drive"))
       {
        $SavePath = "${GoogleFSmountpoint}:\My Drive\$SaveFolderName\$Env:ComputerName"
        Write-PackageConfig
       }
	}
   
# Backup Chocolatey package names on local computer to packages.config file on your HOMESHARE directory if it exists
$ExistHomeShare = (Test-Path "Env:HOMESHARE")
if ($UseHomeShare -match "True" -and $ExistHomeShare -match "True")   
   {
    $SavePath = "$Env:HOMESHARE\$SaveFolderName\$Env:ComputerName"   
    Write-PackageConfig
   }      

# Backup Chocolatey package names on local computer to packages.config file in iCloudDrive directory if it exists
if ($iCloudDrive -match "True" -and (Test-Path $Env:USERPROFILE\iCloudDrive))
   {
    $SavePath = "$Env:USERPROFILE\iCloudDrive\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }    
   
# Backup Chocolatey package names on local computer to packages.config file in Nextcloud directory if it exists
if ($UseNextcloud -match "True" -and (Test-Path $Env:USERPROFILE\Nextcloud))
   {
    $SavePath = "$Env:USERPROFILE\Nextcloud\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   } 
   
# Backup Chocolatey package names on local computer to packages.config file in OneDrive directory if it exists
if ($UseOneDrive -match "True" -and (Test-Path $Env:OneDrive))
   {
    $SavePath = "$Env:OneDrive\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }      
   
# Backup Chocolatey package names on local computer to packages.config file in Netgear ReadyCLOUD directory if it exists
if ($UseReadyCLOUD -match "True" -and (Test-Path $Env:USERPROFILE\ReadyCLOUD))
   {
    $SavePath = "$Env:USERPROFILE\ReadyCLOUD\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }

# Backup Chocolatey package names on local computer to packages.config file in Resilio Sync directory if it exists
if ($UseResilioSync -match "True" -and (Test-Path "$Env:USERPROFILE\Resilio Sync"))
   {
    $SavePath = "$Env:USERPROFILE\Resilio Sync\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }   

# Backup Chocolatey package names on local computer to packages.config file in Seafile directory if it exists
if ($UseSeafile -match "True" -and (Test-Path $Env:USERPROFILE\Documents\Seafile))
   {
    $SavePath = "$Env:USERPROFILE\Seafile\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }
   
# Backup Chocolatey package names on local computer to packages.config file in TonidoSync directory if it exists
if ($UseTonidoSync -match "True" -and (Test-Path $Env:USERPROFILE\Documents\TonidoSync))
   {
    $SavePath = "$Env:USERPROFILE\Documents\TonidoSync\$SaveFolderName\$Env:ComputerName"
    Write-PackageConfig
   }

Write-Host TO RE-INSTALL YOUR CHOCOLATEY PACKAGES: -ForegroundColor magenta 
Write-Host "1> Go to the location of your saved PACKAGES.CONFIG file and type CINST PACKAGES.CONFIG -Y" -ForegroundColor magenta 
If (Test-Path "$env:ChocolateyInstall\lib\instchoco"){
     Write-Host "2> Run InstChoco -y" -ForegroundColor magenta 
   } else {
     Write-Host "2> Get InstChoco and let it do it for you! - https://chocolatey.org/packages/InstChoco" -ForegroundColor magenta 
   }
Write-Host "Found choco-package-list-backup.ps1 useful? Consider buying me a beer via PayPal at https://www.paypal.me/bcurran3donations" -ForegroundColor white
Start-Sleep -s 10


tools\choco-package-list-backup.xml
<?xml version="1.0"?>
<Settings>
  <Preferences>
    <PackagesListFile>packages.config</PackagesListFile>
    <SaveFolderName>ChocolateyPackageListBackup</SaveFolderName>
    <SaveVersions>false</SaveVersions>
    <AppendDate>false</AppendDate>
    <CustomPath>c:\install</CustomPath>
    <UseCustomPath>false</UseCustomPath>
    <UseDocuments>true</UseDocuments>
    <UseHomeShare>true</UseHomeShare>
    <UseBox>true</UseBox>
    <UseDropbox>true</UseDropbox>
    <UseGoogleDrive>true</UseGoogleDrive>
    <UseiCloudDrive>true</UseiCloudDrive>	
    <UseNextcloud>true</UseNextcloud>
    <UseOneDrive>true</UseOneDrive>
    <UseReadyCLOUD>true</UseReadyCLOUD>
    <UseResilioSync>true</UseResilioSync>
    <UseSeafile>true</UseSeafile>
    <UseTonidoSync>true</UseTonidoSync>  
  </Preferences>
</Settings>

<!--
choco-package-list-backup.xml preferences notes:

AppendDate     - Change to true if you want to keep snapshot in time copies - semi-breaks InstChoco compatibility
SaveFolderName - Change the folder name if you don't like my default
SaveVersions   - Specify if you want to save specific package version info or not
CustomPath     - Edit to save to a special location of your choice
UseCustomPath  - Change to true if you are using CustomPath
Usexxxxxxxxx   - Should be obvious
-->
tools\ChocolateyInstall.ps1
$packageName      = 'choco-package-list-backup' 
$toolsDir         = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$Date             = Get-Date -UFormat %Y-%m-%d
$script           = 'choco-package-list-backup.ps1'
$xml              = 'choco-package-list-backup.xml'
$shortcutName     = 'Chocolatey Package List Backup.lnk'
$oldshortcutName  = 'Choco Package List Backup.lnk'
$altshortcutName  = 'Package List Backup.lnk'

Function Update-Config{
[xml]$UpdatedConfig = Get-Content "$env:ChocolateyInstall\bin\$xml"

$UseiCloudDrive = $UpdatedConfig.Settings.Preferences.UseiCloudDrive
if ($UseiCloudDrive -eq $null)
   {
    Write-Host Adding iCloudDrive support to $xml. -foreground magenta
	$NewStuff=$UpdatedConfig.CreateNode("element", "UseiCloudDrive", $null)
    $NewStuff.InnerText=("true") 
	$UpdatedConfig.Settings.Preferences.AppendChild($NewStuff) | out-null
	$UpdatedFile = "True"
   }
   
if ($UpdatedFile -eq "True")
   {   
    $UpdatedConfig.Save("$env:ChocolateyInstall\bin\$xml")
	Write-Host "Updated $xml" -foreground magenta
   }
}

Move-Item "$toolsDir\$script" $env:ChocolateyInstall\bin -Force -ErrorAction SilentlyContinue	

if (Test-Path $env:ChocolateyInstall\bin\$xml){
      Remove-Item $toolsDir\$xml -Force -ErrorAction SilentlyContinue
	  Update-Config
    } else {
	  Move-Item "$toolsDir\$xml" $env:ChocolateyInstall\bin -Force -ErrorAction SilentlyContinue
      $WhoAmI=whoami
      $Acl = Get-Acl "$env:ChocolateyInstall\bin\$xml"
      $Ar = New-Object  system.security.accesscontrol.filesystemaccessrule($WhoAmI,"FullControl","Allow")
      $Acl.SetAccessRule($Ar)
      Set-Acl "$env:ChocolateyInstall\bin\$xml" $Acl
	}
	
If (Test-Path "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey"){
      Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\$oldshortcutName" -Force -ErrorAction SilentlyContinue
      Install-ChocolateyShortcut -shortcutFilePath "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey\$altshortcutName" -targetPath "$env:SystemRoot\system32\WindowsPowerShell\v1.0\powershell.exe" -Arguments "-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command $CPLBPreExisting" -IconLocation $env:ChocolateyInstall\choco.exe -WorkingDirectory $env:ChocolateyInstall\bin\
    } else {
      Install-ChocolateyShortcut -shortcutFilePath "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\$shortcutName" -targetPath "$env:SystemRoot\system32\WindowsPowerShell\v1.0\powershell.exe" -Arguments "-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command $CPLBPreExisting" -IconLocation $env:ChocolateyInstall\choco.exe -WorkingDirectory $env:ChocolateyInstall\bin\
	}
	
Write-Host "Running choco-package-list-backup.ps1 to create backup(s)..." -foreground magenta
&powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:ChocolateyInstall\bin\choco-package-list-backup.ps1"
Write-Host "Edit $env:ChocolateyInstall\bin\$xml to customize your backup(s)." -foreground magenta
Write-Host "TO BACKUP YOUR CHOCOLATEY PACKAGE LIST AGAIN:" -foreground magenta
Write-Host "Command Prompt: POWERSHELL CHOCO-PACKAGE-LIST-BACKUP.PS1" -foreground magenta
Write-Host "PowerShell    : CHOCO-PACKAGE-LIST-BACKUP.PS1" -foreground magenta
If (Test-Path "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey"){
     Write-Host "Windows       : Click Package List Backup in the Start menu under Chocolatey" -foreground magenta
   } else {
     Write-Host "Windows       : Click Chocolatey Package List Backup in the Start menu" -foreground magenta
   }	
tools\ChocolateyUninstall.ps1
$packageName     = 'choco-package-list-backup' 
$script          = 'choco-package-list-backup.ps1'
$xml             = 'choco-package-list-backup.xml'
$oldshortcutName = 'Choco Package List Backup.lnk'
$shortcutName    = 'Chocolatey Package List Backup.lnk'
$altshortcutName = 'Package List Backup.lnk'

Remove-Item "$env:ChocolateyInstall\bin\$script" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ChocolateyInstall\bin\$script*.bak" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ChocolateyInstall\bin\$xml" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\$oldshortcutName" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\$shortcutName" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey\$altshortcutName" -Force -ErrorAction SilentlyContinue

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.

Version Downloads Last Updated Status
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.07.02 3731 Tuesday, July 2, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.06.27 41 Tuesday, July 2, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.01.31.01 2064 Saturday, February 9, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.01.31 750 Friday, February 1, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.01.29 476 Tuesday, January 29, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.01.24 515 Friday, January 25, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.01.04 720 Friday, January 4, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2019.01.02 414 Wednesday, January 2, 2019 Approved
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task) 2018.08.23 1329 Friday, August 24, 2018 Approved

CHANGELOG:

  • 2018.05.17 - added iCloudDrive support
  • 2018.05.09 - added reading preferences from choco-package-list-backup.xml - no more editing the script after upgrades! Backups not created any more.
  • 2018.05.06 - added Dropbox Business and Google Drive File Stream support (Thanks ebbek!)
  • 2018.04.25 - removed run as admin requirement
  • 2018.04.25 - now makes a backup of previous choco-packages-list-backup.ps1 (Since removed.)
  • 2018.04.25 - fixed minor text output error
  • 2018.04.25 - added compatibility with choco-shortcuts-winconfig
  • 2018.04.24.01 - added ability to append the date to PACKAGES.CONFIG
  • 2018.04.24 - added choco-persistent-packages support.
  • 2018.04.23 - now backups up packages automatically on install
  • 2018.02.24 - added Box and Seafile support as well as an icon to run from the Windows Start menu
  • 2018.02.12 - added Nextcloud support (thanks thomasaiman) and fixed TonidoSync (Thanks thomasaiman!)
  • 2018.01.29 - edited re-installation message, updated donation info :)
  • 2017.12.17 - added editable custom save location (requested)

This package has no dependencies.

Discussion for the (unofficial) Choco Package List Backup to Local and Cloud (Script) Package

Ground Rules:

  • This discussion is only about (unofficial) Choco Package List Backup to Local and Cloud (Script) and the (unofficial) Choco Package List Backup to Local and Cloud (Script) 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 Package List Backup to Local and Cloud (Script), 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.
comments powered by Disqus