You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
852 B

remote_file ::File.join(Chef::Config[:file_cache_path], 'ultradefrag.zip') do
source 'http://downloads.sourceforge.net/ultradefrag/ultradefrag-portable-7.1.4.bin.amd64.zip'
action :create
end
archive_file 'Decompress ultradefrag' do
path ::File.join(Chef::Config[:file_cache_path], 'ultradefrag.zip')
destination ::File.join(Chef::Config[:file_cache_path], 'temp_defrag')
action :extract
end
execute 'Rename ultradefrag' do
command "move #{::File.join(Chef::Config[:file_cache_path])}\\temp_defrag\\ultradefrag-* #{::File.join(Chef::Config[:file_cache_path], 'ultradefrag')}"
not_if { ::File.exist?(::File.join(Chef::Config[:file_cache_path], 'ultradefrag')) }
end
execute 'Run ultradefrag' do
command "#{::File.join(Chef::Config[:file_cache_path], 'ultradefrag', 'udefrag.exe')} --optimize --repeat %SystemDrive%"
action :run
end