Chef bootstrap fail


Hi guys,

I am automating the deployment of SAS Analytics using chef. I am just running a script using chef to install all the components. following is the piece of code that install SAS.

batch 'run install setup' do
  code <<-EOH
    D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile "D:/response_files/"

When I run the cookbook then I get the following error.

======================================================================= Error executing action run on resource ‘batch[run install setup]’ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '-1' ---- Begin output of "C:\Windows\system32\cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20180509-520-1vp2k3f.bat" ---- STDOUT: C:\>D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile "D:/response_files/" STDERR: ---- End output of "C:\Windows\system32\cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20180509-520-1vp2k3f.bat" ---- Ran "C:\Windows\system32\cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20180509-520-1vp2k3f.bat" returned -1 Resource Declaration: --------------------- # In c:/chef/cache/cookbooks/CBK_WIN_SAS/recipes/rcp_all_win_default.rb 104: batch 'run install setup' do 105:   code <<-EOH 106:     D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile "D:/response_files/" 107:   EOH 108: end 109: Compiled Resource: ------------------ # Declared in c:/chef/cache/cookbooks/CBK_WIN_SAS/recipes/rcp_all_win_default.rb:104:in `from_file' batch("run install setup") do   action [:run]   retries 0   retry_delay 2   default_guard_interpreter :batch   command "run install setup"   backup 5   returns 0   code "    D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile \"D:/response_files/\"\n"   interpreter "cmd.exe"   declared_type :batch   cookbook_name "CBK_WIN_SAS"   recipe_name "rcp_all_win_default" end Platform: --------- x64-mingw32 [2018-05-09T11:46:10+00:00] INFO: Running queued delayed notifications before re-raising exception

But, If I run chef-client on the specified node, then it does not raise any issue and install everything perfectly. I could not figure out the possible issue in remote bootstrap and chef-client. I would be waiting for experts opinion in this regard.