Is their any way to make wait chef resource to until installation gets completed?

setupexe = 'D:\database\setup.exe’
package ‘install’ do
source "#{setupexe}"
installer_type :custom
options '-silent --waitforcompletion -noconfig -responsefile D:\db.rsp’
action :install

this is working but cmd is not getting exit. help out

Chef will always wait for the installer to come back, if it’s not completing it’s likely something about the installer or options being passed that are causing this to not work as expected. The problem isn’t with making the package resource wait but that the installer or options aren’t working as you expect.

can you suggest correct way to install oracle 12 c software using response file or just tell me the option that should i use

As we’ve said several times before, Chef automates that which you already know how to do. I don’t know what options are needed specifically for Oracle 12c installation on Windows, that is knowledge that you need to bring and Chef can helps you automate that process. This isn’t unique to just this piece of software and is generally applicable to most configuration management.

I suggest you look at that documentation for Oracle 12c on Windows and gather the options suggested for an automated install. That should pretty directly translate into the options needed and if you are getting specific errors with Chef we may be able to advise you further.