Add reg key without prompt or confirmation window using chef resources

How can I add registry keys to the windows server using a chef resource without prompt or confirmation window.

Right now I'm using the following -

execute 'dsn' do
command 'f:\ggs\dirobey\sw730gga016_dsn_registry.reg f:'
returns [0, 1]
action :run
end

This executes the reosurce but prompts the confirmation window, Can anyone please help me on this need this to be ASAP.

Take a look at the windows_registry resource

Adding a pointer to the docs for the registry_key resource, that would be the right thing to do from a Chef standpoint unless there are thousands of entries that need adding via that .reg file - in which case you could change your command to the following:

regedit /s <regfile.reg>

Stuart

Thanks Stuart can you be more specific and give the exact command looking at my scenario, that will help.

Thanks Stuart, I have updated the command. I will keep you posted once Im able to test it.
Cheers !!

This seems to be working fine, thanks for the quick response.

Cheers !!