Choclatey Help

I'm using the Choclatey scripted actions for the first time.  They seem to run successfully once, but if they are run again it fails with error:

"WARNING: Files from a previous installation of Chocolatey were found at 'C:\ProgramData\chocolatey'.
WARNING: An existing Chocolatey installation was detected. Installation will not continue. This script will not
overwrite" 

The solution is to delete the folder above, but how is everyone automating this?  I'm expecting to use these scripts to install then keep the apps up to date.  Are they not designed for that?

0

Comments (1 comment)

Avatar
Dave Stephenson
(Edited )

Great question, Steve Hopler!

Chocolatey was kind of a precursor to WinGet (the engine behind our Unified Application Management feature).
It's still a great tool, but UAM may be more of what you need.

That being said, if you're wanting to utilize Chocolatey scripts, you can clone/edit the script and change the Install command to be an Upgrade command and that should do what you're wanting.

Example

# Install Google Chrome
choco install googlechrome -y

vs

# Install/Upgrade Google Chrome
choco upgrade googlechrome -y

1

Please sign in to leave a comment.