0

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?

vini
  • 87
  • 12

1 Answers1

0
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.

Draco Ater
  • 20,820
  • 8
  • 62
  • 86