Installer type for Windows Package ‘autologon’ not specified and cannot be determined from file extension ‘exe’

“Installer type for Windows Package ‘autologon’ not specified and cannot be determined from file extension ‘exe’

      Resource Declaration:
      ---------------------
      # In C:/Users/kitchen/AppData/Local/Temp/kitchen/cache/cookbooks/rtest/recipes/windows.rb

       26: windows_package ‘autologon’ do
       27:   source “#{node[‘rtest’][‘remote_root_url’]}/autologon/3.10/Autologon.exe”
       28: end
       29:

Generally the advice I'd give with an error message like this is to look at the windows_package resource documentation: https://docs.chef.io/resource_windows_package.html ...

If Chef cannot detect the package type to install, you need to specify it using the installer_type property (most likely, setting it to :custom) and also provide the relevant unattended options (e.g. options '/q').

But it looks like you are installing Autologon, as in https://docs.microsoft.com/en-us/sysinternals/downloads/autologon - in this case it's more likely that Autologon.exe is the actual executable rather than an installer, and you either need to run it once with the /accepteula flag, or set the following registry key before the first run:

[HKEY_CURRENT_USER\Software\Sysinternals\Autologon]
"EulaAccepted"=dword:00000001

It might be better/easier in your case to install from the chocolatey package autologon: https://chocolatey.org/packages/autologon where this is all done for you.

Stuart