title: Opscode CHEF(11.12.8) - chef-client can't add env. var. to PATH
body: <p>I'm using chef-client(11.12.8) with windows nodes(Win Server 2012).</p>
  
  <p>I install perforce client. To do so I launch in a CMD chef-client in order to execute my cookbook.</p>
  
  <p>Perforce installation set in PATH the appropriate path to p4.exe.
  But in the cmd where I launch chef-client command the PATH is not updated.
  So after, in my cookbook when I try to execute the command 'p4 sync' in a windows_batch resource it fails.</p>
  
  <p>Solutions I try,</p>
  
  <p>1/<br>
  set PATH=%PATH%;C:\Program Files\Perforce <br>
  in a windows_batch resource before launching a p4 sync command.<br>
  DID NOT WORK.<br>
  <br>
  2/<br>
  Put the previous command in a batch.<br>
  DID NOT WORK.<br>
  <br>
  3/<br>
  $env:Path = $env:Path + ";C:\Program Files\Perforce"<br>
  in a powershell_script resource before launching a p4 sync command.<br>
  DID NOT WORK.<br></p>
  
  <p>Is there a way to do that ?<br>
  Instead of using:<br>
  C:\Program Files\Perforce\p4.exe<br></p>
  
  <p>THANKS</p>
  
  <hr>
  
  <p>UPDATE_01</p>
  
  <p>the code but i don't think it would help so much...</p>
  
  <p>Install perforceClient</p>
  
  <pre><code>windows_package 'Perforce Client' do
    source 'PerforceClient_2014.1\\p4vinst64.exe'
    options '/s /v"/qn"'
    installer_type :custom
    action :install
  end
  
  ...
  
  windows_batch 'Perforce sync' do
    code &lt;&lt;-EOH
    p4 sync //APP/
    EOH
  end
  </code></pre>
  
  <p>Here the p4 command is unknow from the cmd where I launch chef-client command.
  I will have a look at the batch resource.
  Thanks</p>