问题
Trying to install ImageMagick on a Windows server 2008 R2 machine in a Chef recipe.
Works perfectly with the following recipe
windows_package 'install imagemagick' do
action :install
source 'http://www.imagemagick.org/download/binaries/ImageMagick-7.0.3-5-Q16-x64-dll.exe'
end
However I'm missing an important part.
When I run the installer on the machine, I'm give some additional tasks with the install (see image below). I need the Install legacy utilities (e.g. convert) option checked.
Can I do this in a Chef recipe?
I know windows_package has the options
that could handle this, but how to I figure out what to put for that option?
回答1:
As @StephenKing correctly commented, use the /MERGETASKS=legacy_support command-line switch.
To find this out, you do not have to go to a source code.
Run the installer with the
/?
to find out its command-line switches.Run the installer with the
/SAVEINF=path
to get it save its settings to an INI file. If you check the task you want ("Install legacy utilities (e.g. convert)") during the installation, you will see this directive in the INI file:Tasks=desktop_icon,modifypath,legacy_support
来源:https://stackoverflow.com/questions/40430549/chef-windows-package-options-to-check-box