Not able to validate package installation on windows using inspec

399 Views Asked by At

I want to know how to validate the installation of a package/application ( ON WINDOWS machine ) through inspec. I tried using package command to test but it didn't work.

Control :

describe package ('java') do it { should be_installed } end

Error :

System Package java × System Package java should be installed expected that System Package java is installed

What's wrong here or are there any other ways to achieve this?

1

There are 1 best solutions below

0
On
describe package 'Java SE Development Kit 8 Update 111 (64-bit)' do
  it { should be_installed }
end

The name of the package should be the one you see in "Programs and Features" in Control Panel.