Add reg key without prompt or confirmation window using chef resources

#1

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.

#2

Take a look at the windows_registry resource

#3

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

#4

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

#5

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

#6

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

Cheers !!