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.
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:
To pass additional options like installation directory, checkboxes, and uploading a license key when using the windows_package resource in Chef, you typically need to use the options property. This allows you to provide command-line arguments or silent install parameters that the installer supports.
For UFT_14.00_Setup.exe, you'll need to refer to its documentation or run the installer with /help or /? to get a list of available silent install parameters. Most enterprise installers support silent installation through switches like /s, /quiet, or /silent, and let you customize the install path or preconfigure options through a response file or direct parameters.
Here’s how you might structure the Chef resource with options:
windows_package 'UFT_14' do
action :install
source 'C:\Users\Dell\Downloads\UFT_14.00_Setup.exe'
installer_type :custom
options '/s /v"INSTALLDIR="C:\Program Files (x86)\UFT" LICENSEKEY=XXXXX-XXXXX-XXXXX-XXXXX /qn"'
end
Breakdown:
/s starts silent installation.
/v passes arguments to the embedded MSI installer.
INSTALLDIR sets the install path.
LICENSEKEY is an example of passing the license key.
/qn ensures no UI is shown (quiet mode).
If UFT uses an .iss (InstallShield silent setup file), you could do:
options '/s /f1"C:\path\to\response_file.iss"'
Important: You’ll need to know the exact parameters UFT’s installer supports. If unsure, run the installer manually and see if it gives you the option to generate a response file, or check its official admin guide for silent install options.