Reputation: 207
I'm new to Chocolatey and playing with it now. My goal is to install and upgrade all my essential applications by one PowerShell script.
I have one problem atm. When I manually install e.g. CCleaner then I can configurate by the wizard if I a want a desktop icon or if the recycle bin has a new Run-CCleaner-entry. I always disable both of them.
I cannot see a way to configurate my powershell command to disable that two options.
Here is the link to the package: https://chocolatey.org/packages/ccleaner
If there is no option in Chocolately is it recommended that I manipulate the registry in my script after installing CCleaner? How does this work for other apps?
Thank you for the effort!
Upvotes: 0
Views: 508
Reputation: 18991
The short answer is, it depends :-(
Some packages, for example git allows you to use the concept of Package Parameters to control the different pieces of functionality for an installer.
Now the CCleaner package also has the concept of Package Parameters, but only for specifying the locale that is used for the install. You can see the available package parameters in the chocolateyInstall.ps1 file here.
Now, it is possible to directly pass installation arguments to the native installer. This is documented here:
https://chocolatey.org/docs/commands-install#options-and-switches
Specifically:
--ia, --installargs, --installarguments, --install-arguments=VALUE InstallArguments - Install Arguments to pass to the native installer in the package. Defaults to unspecified.
-o, --override, --overrideargs, --overridearguments, --override-arguments OverrideArguments - Should install arguments be used exclusively without appending to current package passed arguments? Defaults to false.
Using these arguments on the choco install
command would allow you, assuming it is possible, to further control the installation.
The hard part would be finding out what arguments needed to be passed to the installer in order for the actions that you want to happen. There is no standard for this, and it is something that would have to be done on a per package basis.
Upvotes: 2