User input in recipe

Hi All,

I am trying to install a package (setup.bat) file in chef recipe. this setup.bat expects certain user inputs.

Is there any way in chef to handle such case?

Are you trying to use the package resource, or are you just executing the .bat file with an execute resource?

its just .bat file

You should give more details about it.

First of all, I’ll assume that you own the content of this setup.bat file, you may want to break it down to use several resources.
Next, if the prompts are really stupid like “Press enter to continue” you can just get rid of that, isn’t it ?
Next, if it’s a program, try to see if there’s some kind of switches to make it run unattended (see foo.exe /help)
Finally, if it prompts you for redundant stuff like yes or no you can call your bat file as yes | setup.bat or yes no | setup.bat