Chef Windows_package选项复选框 [英] chef windows_package options to check box
问题描述
尝试以厨师食谱在Windows Server 2008 R2计算机上安装ImageMagick。
与以下食谱完美配合
windows_package'install imagemagick'做
操作:install
源'http://www.imagemagick.org/下载/二进制文件/ImageMagick-7.0.3-5-Q16-x64-dll.exe'
结束
但是我缺少重要的部分。
当我在计算机上运行安装程序时,我会给安装一些其他任务(参见图像)下面)。我需要选中安装旧版实用程序(例如,转换)选项。
我可以在厨师食谱中做到吗?
有选项
可以解决这个问题,但是我如何找出该选项的内容呢?
作为 @StephenKing正确注释,请使用 / MERGETASKS = legacy_support
命令行开关。
要找出答案,您不必查看源代码。
-
使用
/?
运行安装程序以找出其命令行开关。 -
运行使用
/ SAVEINF = path
进行安装的安装程序将其设置保存到INI文件中。如果在安装过程中检查了所需的任务(安装旧版实用程序(例如,转换) ),您将在INI文件中看到以下指令:Tasks = desktop_icon,modifypath,legacy_support
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?
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
这篇关于Chef Windows_package选项复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!