chef windows_package options to check box

别来无恙 提交于 2019-12-10 12:05:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!