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?
Ryan ShripatRyan Shripat
![]() 3 Answers
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:
and then spit out a big custom chocolatey package that could reconstruct the environment.
Matt WrockMatt Wrock
This might get you some of the way:
lists installed packages (programs), whether installed by Chocolately, or not, as in your case. Adding
-v gives you (sometimes) the install path:
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!
drkvogeldrkvogel
There is one way to do it..
This will get you installed gems, things installed in programs and features, and if you do have chocolatey packages, it will pull those as well.
ferventcoderferventcoder
Not the answer you're looking for? Browse other questions tagged windows-7windowsinstallationscriptchocolatey or ask your own question.
Most Windows users don’t pay much attention to how desktop programs are installed on their system. For years we’ve been trained to seek out a website, download an EXE or MSI file, and then click, click, click our way through the installation.
It’s an easy method, but it’s also time consuming because of the manual interaction.
A burgeoning project called Chocolatey wants to make it easy to install desktop apps without having to click through an interminable number of installation windows.
What is Chocolatey?
Chocolatey is a command line application installer for Windows based on a developer-centric package manager called NuGet. Unlike manual installations, Chocolatey adds, updates, and uninstalls programs in the background requiring very little user interaction.
Chocolatey has its own package feed that is created and maintained by the project’s community members.
Behind the scenes, most Chocolatey packages simply download a program’s official executable and install it without any further interaction from the user.
You lost me at “command line”
No, wait, hear me out!
Getting new programs the old fashioned way is very easy, but manual installs are also inefficient. Wouldn’t you rather spend your time checking out the latest cat videos on YouTube while your PC goes about installing programs by itself?
That’s the promise of Chocolatey. If the program has any dependencies, such as the .NET framework, Chocolatey will install those too.
Chocolatey can also take care of multiple program installations.
Imagine cracking open a new PC, downloading Chocolatey and then typing a one-line command to install all the programs you’d like to have on your new machine. That's what Chocolatey does.
Installing Chocolatey
Getting Chocolatey onto your system is very simple since the commands can be copied and pasted into your command prompt from Chocolatey.org. To start, you need to open an elevated command prompt.
To do this in Windows 8.1, click on the Start button and go to the all apps screen. Under the Windows System heading find Command Prompt, right click-it and select Run as administrator. When the User Account Control window opens, authorize it by clicking Yes.
A command prompt window should open with something like C:WINDOWSsystem32.
Next, visit Chocolatey.org and copy the first box. At this writing, the commands were:
Paste it into the prompt, press Enter and your PC will take care of the rest.
Usually doing a copy and paste of commands is not advisable, but in this case it’s just fine.
So you can rest easier, let’s break the instructions down a little bit: These commands are telling your PC to launch PowerShell and don’t load any custom profiles a power user might have. Next, it tells Windows to set the execution policy to unrestricted to allow any PowerShell script to be run and then download and run the Chocolatey install script.
Chocolatey basicsInstalling programs Chocolatey style
Once you’ve got Chocolatey up and running, it’s time to start installing programs. Open an administrative command prompt again and type
cinst [program name] . If you wanted to install VLC you’d type:
Pretty easy, right? The trick is that you need to know the exact name Chocolatey uses for each program. You can’t just type
Chrome or Google-Chrome and expect Chocolatey to figure it out.
To find the names of programs, you can try playing around on the command line with the trial and error method (which works more often than you’d think). If you don't have that kind of time, search Chocolatey.org’s online package catalog for programs. You can also search for packages right on the command line:
Multiple installs
There are two ways to install multiple programs in one sitting with Chocolatey. The first is to type multiple arguments into the command line. If you wanted to install VLC, GIMP, and Firefox you’d type:
For much larger batches of programs, however, you’re better off creating an XML document with a .config file extension and formatting it like so:
That basic document structure can include as many programs as you like, and can even include alternative sources other than Chocolatey’s community feed. For a more thorough tutorial on creating a multiple install file, check out developerFusion.
Uninstalling and updating
Updating installed programs via Chocolatey is simple too. Type
cup [program name] into an administrative command. To update DosBox, for example, type:
You can also update all your programs by typing
cup all . If your package is using an alternative source other than the main Chocolatey package feed, you can type:
Uninstalling a package is a little different. Going back to our example, you'd type the following to uninstall DosBox:
On the next page, we'll cover standardized commands and security concerns.
I get this error:
Can't locate Foo.pm in @INC
Is there an easier way to install it than downloading, untarring, making, etc?
Chocolate Installer For Windows 1023 Answers
On Unix:
usually you start cpan in your shell:
# cpan
and type
install Chocolate::Belgian
or in short form:
cpan Chocolate::Belgian
On Windows:
If you're using ActivePerl on Windows, the PPM (Perl Package Manager) has much of the same functionality as CPAN.pm.
Example:
# ppm ppm> search net-smtp ppm> install Net-SMTP-Multipart
see How do I install Perl modules? in the CPAN FAQ
Many distributions ship a lot of perl modules as packages.
You should always prefer them as you benefit from automatic (security) updates and the ease of removal. This can be pretty tricky with the cpan tool itself.
For Gentoo there's a nice tool called g-cpan which builds/installs the module from CPAN and creates a Gentoo package (ebuild) for you.
Benedikt WaldvogelBenedikt Waldvogel
Try App::cpanminus:
It's great for just getting stuff installed. It provides none of the more complex functionality of CPAN or CPANPLUS, so it's easy to use, provided you know which module you want to install. If you haven't already got cpanminus, just type:
to install it.
It is also possible to install it without using cpan at all. The basic bootstrap procedure is,
For more information go to the App::cpanminus page and look at the section on installation.
Chocolate Installer For Windows 7
I note some folks suggesting one run cpan under sudo. That used to be necessary to install into the system directory, but modern versions of the CPAN shell allow you to configure it to use sudo just for installing. This is much safer, since it means that tests don't run as root.
If you have an old CPAN shell, simply install the new cpan ('install CPAN') and when you reload the shell, it should prompt you to configure these new directives.
Nowadays, when I'm on a system with an old CPAN, the first thing I do is update the shell and set it up to do this so I can do most of my cpan work as a normal user.
Also, I'd strongly suggest that Windows users investigate strawberry Perl. This is a version of Perl that comes packaged with a pre-configured CPAN shell as well as a compiler. It also includes some hard-to-compile Perl modules with their external C library dependencies, notably XML::Parser. This means that you can do the same thing as every other Perl user when it comes to installing modules, and things tend to 'just work' a lot more often.
Dave RolskyDave Rolsky
If you're on Ubuntu and you want to install the pre-packaged perl module (for example, geo::ipfree) try this:
OttoOtto
A couple of people mentioned the cpan utility, but it's more than just starting a shell. Just give it the modules that you want to install and let it do it's work.
If you don't give it any arguments it starts the CPAN.pm shell. This works on Unix, Mac, and should be just fine on Windows (especially Strawberry Perl).
There are several other things that you can do with the cpan tool as well. Here's a summary of the current features (which might be newer than the one that comes with CPAN.pm and perl):
brian d foybrian d foy
dreevesdreeves
Also see Yes, even you can use CPAN. It shows how you can use CPAN without having root or sudo access.
CorionCorion
Otto made a good suggestion. This works for Debian too, as well as any other Debian derivative. The missing piece is what to do when apt-cache search doesn't find something.
Then whenever you have a random module you wish to install:
This will give you a deb package that you can install to get Some::Random::Module. One of the big benefits here is man pages and sample scripts in addition to the module itself will be placed in your distro's location of choice. If the distro ever comes out with an official package for a newer version of Some::Random::Module, it will automatically be installed when you apt-get upgrade.
Community♦
mikegrbmikegrb
Already answered and accepted answer - but anyway:
IMHO the easiest way installing CPAN modules (on unix like systems, and have no idea about the wondows) is:
The above is installing the 'zero configuration CPAN modules installer' called
cpanm . (Can take several minutes to install - don't break the process)
and after - simply:
Lots of recommendation for
CPAN.pm , which is great, but if you're using Perl 5.10 then you've also got access to CPANPLUS.pm which is like CPAN.pm but better.
And, of course, it's available on
CPAN for people still using older versions of Perl. Why not try:
Dave CrossDave Cross
Many times it does happen that cpan install command fails with the message like'make test had returned bad status, won't install without force'
In that case following is the way to install the module:
On ubuntu most perl modules are already packaged, so installing is much faster than most other systems which have to compile.
To install
Foo::Bar at a commmand prompt for example usually you just do:
Sadly not all modules follow that naming convention.
Use cpan command as
cpan Modulename
To install dependencies automatically follow the below
I prefer App::cpanminus, it installs dependencies automatically. Just do
2 ways that I know of :
USING PPM :
With Windows (ActivePerl) I've used ppm
from the command line type ppm. At the ppm prompt ..
or
to get a list of foo modules available. Type help for all the commands
USING CPAN :
you can also use CPAN like this (*nix systems) :
gets you a prompt
at the prompt ..
type h to get a list of commands for cpan
JWHEATJWHEAT
On Fedora you can use
as long as Fedora has an existing package for the module.
On
Fedora Linux or Enterprise Linux , yum also tracks perl library dependencies. So, if the perl module is available, and some rpm package exports that dependency, it will install the right package for you.
(most likely perl-Chocolate-Belgian package, or even ChocolateFactory package)
Easiest way for me is this:
a) automatic recursive dependency detection/resolving/installing
b) it's a shell onliner, good for setup-scripts
If you want to put the new module into a custom location that your cpan shell isn't configured to use, then perhaps, the following will be handy.
E with an accent over it. Sometimes you can use the
yum search foo to search the relative perl module, then use yum install xxx to install.
On Windows with the ActiveState distribution of Perl, use the ppm command.
PW.PW.
Simply executing
cpan Foo::Bar on shell would serve the purpose.
Seems like you've already got your answer but I figured I'd chime in. This is what I do in some scripts on an Ubuntu (or debian server)
This works well for me, maybe there is something here you can use.
protected by jwwJun 11 '18 at 18:38
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead? Not the answer you're looking for? Browse other questions tagged perlinstallcpan or ask your own question.
Most Windows users don’t pay much attention to how desktop programs are installed on their system. For years we’ve been trained to seek out a website, download an EXE or MSI file, and then click, click, click our way through the installation.
It’s an easy method, but it’s also time consuming because of the manual interaction.
A burgeoning project called Chocolatey wants to make it easy to install desktop apps without having to click through an interminable number of installation windows.
What is Chocolatey?
Chocolatey is a command line application installer for Windows based on a developer-centric package manager called NuGet. Unlike manual installations, Chocolatey adds, updates, and uninstalls programs in the background requiring very little user interaction.
Chocolatey has its own package feed that is created and maintained by the project’s community members.
Behind the scenes, most Chocolatey packages simply download a program’s official executable and install it without any further interaction from the user.
You lost me at “command line”
No, wait, hear me out!
Getting new programs the old fashioned way is very easy, but manual installs are also inefficient. Wouldn’t you rather spend your time checking out the latest cat videos on YouTube while your PC goes about installing programs by itself?
That’s the promise of Chocolatey. If the program has any dependencies, such as the .NET framework, Chocolatey will install those too.
Chocolatey can also take care of multiple program installations.
Imagine cracking open a new PC, downloading Chocolatey and then typing a one-line command to install all the programs you’d like to have on your new machine. That's what Chocolatey does.
Installing Chocolatey
Getting Chocolatey onto your system is very simple since the commands can be copied and pasted into your command prompt from Chocolatey.org. To start, you need to open an elevated command prompt.
To do this in Windows 8.1, click on the Start button and go to the all apps screen. Under the Windows System heading find Command Prompt, right click-it and select Run as administrator. When the User Account Control window opens, authorize it by clicking Yes.
A command prompt window should open with something like C:WINDOWSsystem32.
Next, visit Chocolatey.org and copy the first box. At this writing, the commands were:
Paste it into the prompt, press Enter and your PC will take care of the rest.
Usually doing a copy and paste of commands is not advisable, but in this case it’s just fine.
So you can rest easier, let’s break the instructions down a little bit: These commands are telling your PC to launch PowerShell and don’t load any custom profiles a power user might have. Next, it tells Windows to set the execution policy to unrestricted to allow any PowerShell script to be run and then download and run the Chocolatey install script.
Chocolatey basicsInstalling programs Chocolatey style
Once you’ve got Chocolatey up and running, it’s time to start installing programs. Open an administrative command prompt again and type
cinst [program name] . If you wanted to install VLC you’d type:
Pretty easy, right? The trick is that you need to know the exact name Chocolatey uses for each program. You can’t just type
Chrome or Google-Chrome and expect Chocolatey to figure it out.
To find the names of programs, you can try playing around on the command line with the trial and error method (which works more often than you’d think). If you don't have that kind of time, search Chocolatey.org’s online package catalog for programs. You can also search for packages right on the command line:
Multiple installs
There are two ways to install multiple programs in one sitting with Chocolatey. The first is to type multiple arguments into the command line. If you wanted to install VLC, GIMP, and Firefox you’d type:
For much larger batches of programs, however, you’re better off creating an XML document with a .config file extension and formatting it like so:
That basic document structure can include as many programs as you like, and can even include alternative sources other than Chocolatey’s community feed. For a more thorough tutorial on creating a multiple install file, check out developerFusion.
Uninstalling and updating
Updating installed programs via Chocolatey is simple too. Type
cup [program name] into an administrative command. To update DosBox, for example, type:
You can also update all your programs by typing
cup all . If your package is using an alternative source other than the main Chocolatey package feed, you can type:
Uninstalling a package is a little different. Going back to our example, you'd type the following to uninstall DosBox:
On the next page, we'll cover standardized commands and security concerns.
I am looking to find out the current Chocolatey installation path using PowerShell.
51 rows Download AXXo Torrent at TorrentFunk. We have 1000 AXXo Other torrents for you! 5 axxo. Sometime during the last 24 hours there was a mass deletion of aXXo torrents from The Pirate Bay's tracker. It appears that a dispute between aXXo and The Pirate Bay about how to best handle. AXXo Movies is a torrent blog posting about the latest movie torrents releases. Axxomovies.in is blocked in some countries but can be accessed by using an aXXo Movies proxy site.
user284244
2 Answers
There is an environment variable set on installation,
ChocolateyInstall , which is set to C:Chocolatey by default in versions of Chocolatey less than 0.9.8.27. After that, this defaults to C:ProgramDataChocolatey .
NOTE: By default, the
C:ProgramData folder on Windows is hidden. You will either need to enable hidden files and folders through Folder Options | View or you can navigate directly to the path shown above by copy/pasting directly into the Windows Explorer address bar.
In version 0.9.9 of Chocolatey, it actively moves from the old folder location to the new one.
You can also pre-emptively create this environment variable before installing Chocolatey to control where it gets installed if required.
Gary Ewan ParkGary Ewan Park
When you install Chocolatey they add the Chocolatey
/bin path to your path variable.
In PowerShell:
wallybhwallybh
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |