anchor.diff:  @rem limitations under the License.
   @rem
   
  -@setlocal
  +@rem Use delayed environment expansion so that ERRORLEVEL can be evaluated with the
  +@rem !ERRORLEVEL! syntax which evaluates at execution of the line of script, not when
  +@rem the line is read. See help for the /E switch from cmd.exe /? .
  +@setlocal ENABLEDELAYEDEXPANSION
   
   <%= "SETX HTTP_PROXY \"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] %>
  -mkdir <%= bootstrap_directory %>
  +
  +@set BOOTSTRAP_DIRECTORY=<%= bootstrap_directory %>
  +@echo Checking for existing directory "%BOOTSTRAP_DIRECTORY%"...
  +@if NOT EXIST %BOOTSTRAP_DIRECTORY% (
  +    @echo Existing directory not found, creating.
  +    @mkdir %BOOTSTRAP_DIRECTORY%
  +) else (
  +    @echo Existing directory found, skipping creation.
  +)
   
   > <%= bootstrap_directory %>\wget.vbs (
    <%= win_wget %>
  
positive.code: 
  @rem Determine the version and the architecture
  
  FOR /F "tokens=1-8 delims=.[] " %%A IN ('ver') DO (
  @set WinMajor=%%D
  @set WinMinor=%%E
  @set WinBuild=%%F
  )
  
  goto Version%WinMajor%.%WinMinor%
  
  @rem If this is an unknown version of windows set the default
  @set MACHINE_OS=2008r2
  goto architecture
  
  :Version6.0
  @set MACHINE_OS=2008
  goto architecture
  
  :Version5.2
  @set MACHINE_OS=2003r2
  goto architecture
  
  :Version6.1
  @set MACHINE_OS=2008r2
  goto architecture
  
  :Version6.2
  @set MACHINE_OS=2012
  goto architecture
  
  :architecture
  
  goto Architecture%PROCESSOR_ARCHITECTURE%
  
  @rem If this is an unknown architecture set the default
  
negative.code: echo server.start >>C:\chef_zero_startup.rb
  C:\opscode\chef\embedded\bin\ruby C:\chef_zero_startup.rb
  
  @echo Starting chef to bootstrap the node...
  <%= start_chef %>
  
  