How to pass multiple options in windows package for .exe file

how to pass multiple options in windows package for .exe file

windows_package 'UFT_14' do

action :install

source 'C:\Users\Dell\Downloads\UFT_14.00_Setup.exe'

end

here I need pass options like

installation directory
Check few check boxes
upload license key

Hi @macraj

I think our docs for windows_package at https://docs.chef.io/resource_windows_package.html#examples should have you covered. TL;DR you'll need to set the installer_type property to :custom and set any options you need using the options property.

The trick with these executable packages on Windows is understanding the unattended options for the executable. These are sometimes obtained by running packagename.exe /? or by searching for silent/unattended installation options on the vendor's site.

Hope this helps.

vendor sites means package.exe file should support silent/unattended installation process right?

if possible can you please share me one example of it. am little confused with syntax of options

vendor sites means package.exe file should support silent/unattended installation process right?

Yes, that's an essential part of the system working for you here! I don't know of any packaging technologies that don't support silent/unattended mode, so it generally comes down to how the package has been authored and what options it takes at the command line. Which comes onto your second question

if possible can you please share me one example of it. am little confused with syntax of options

I already did (it was in the link in my original reply). Options is simply a string that takes the same arguments as if you ran the package on the command line. For example if the vendor tells you that the options are /Q for quiet mode, and /TARGETDIR=<dir> and /LICENSEKEY=<key> you would run this on the command line:

mypackage.exe /Q /TARGETDIR=c:\myapp /LICENSEKEY=abcd1234efgh

and accordingly you would use the following in Chef DSL:

windows_package 'myapp' do
  source 'https://mydistributionserver/distributions/mypackage.exe'
  installer_type :custom
  options '/Q /TARGETDIR=c:\myapp /LICENSEKEY=abcd1234efgh'
end

Hope this helps.