Skip to content

Instantly share code, notes, and snippets.

@dougireton
Created April 4, 2013 20:49
Show Gist options
  • Save dougireton/5314240 to your computer and use it in GitHub Desktop.
Save dougireton/5314240 to your computer and use it in GitHub Desktop.
# include Windows::Helper from Opscode Windows Cookbook
::Chef::Recipe.send(:include, Windows::Helper)
# now you can call helper methods like win_friendly_path directly
my_batch_file = win_friendly_path(
::File.join( node['cookbook']['batch_dir'],'foo.bat'))
execute "My batch file" do
command my_batch_file
creates "e:/logs/my_batch_file.log"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment