Can I create a Chocolatey installer automatically based on my currently installed applications? How?
I intend to reinstall Windows on my computer soon and I'd like to make the process of reinstalling all of my applications as seamless as possible. I know you can create a Chocolatey script that can be run on the new machine that will install of the applications I add to the script, but I have many applications and the process of typing out all of these into the script is tedious.
Is there some application available that can scan the currently installed programs on my computer (Win7) and generate a Chocolatey/Boxstarter script containing all of my programs that I can then use to reinstall all of them on my new computer?
As far as I am aware, there is no such solution. It is definitely something I have thought of. It would be super cool to run a command that would look at:
- Currently installed packages
- Running services
- Installed windows features
- GUI registry settings
- MSIs installed and find matching chocolatey packages
and then spit out a big custom chocolatey package that could reconstruct the environment.
This might get you some of the way:
choco list -li
lists installed packages (programs), whether installed by Chocolately, or not, as in your case. Adding -v
gives you (sometimes) the install path:
choco list -liv
Then you could find the appropriate Chocolatey packages by searching chocolatey.org manually (or by some other means...) for the programs listed and prepare a powershell or Cygwin bash script like this: http://robinosborne.co.uk/2012/01/06/scripting-the-setup-of-a-developer-pc-part-3-of-4-installing-uh-everything-with-chocolatey/
Good luck!
There are two handy chocolatey packages by bcurran3 / LAComputerBuddy that will help you achieve this:
(unofficial) Choco Package List Backup to Local and Cloud (Script + Task)
This can be used to regularly export and backup your chocolatey (and other installed!) programs. It can be configured to write to local folders and many cloud backup solutions.
https://chocolatey.org/packages/choco-package-list-backup
(unofficial) InstChoco (Portable)
By the same author, so it integrates well with the backup solution. It can be used to reinstall all files from a backup.
https://chocolatey.org/packages/instchoco
---
The source code for both packages can be found here:
https://github.com/bcurran3/ChocolateyPackages