diff --git a/metadata.rb b/metadata.rb index 0b3d92e..510cbe1 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) source_url 'https://github.com/anuriq/chef-winlogbeat' if respond_to?(:source_url) issues_url 'https://github.com/anuriq/chef-winlogbeat/issues' if respond_to?(:issues_url) -version '1.0.2' +version '1.0.3' supports 'windows' diff --git a/recipes/install.rb b/recipes/install.rb index cae6aaf..57104ab 100644 --- a/recipes/install.rb +++ b/recipes/install.rb @@ -49,11 +49,7 @@ powershell_script 'Unzip Winlogbeat' do code <<-EOH - $shell = new-object -com shell.application - $zip = $shell.NameSpace('#{package_file}') - foreach($item in $zip.items()) { - $shell.Namespace('#{destination}').copyhere($item) - } + Expand-Archive '#{package_file}' '#{destination}' EOH not_if { ::File.exist?("#{node['winlogbeat']['service_dir']}\\winlogbeat.exe") } end