Skip to content

Instantly share code, notes, and snippets.

@vinyar
Last active December 23, 2015 19:09
Show Gist options
  • Save vinyar/6680682 to your computer and use it in GitHub Desktop.
Save vinyar/6680682 to your computer and use it in GitHub Desktop.
use_inline_resources
action :add do
log "My name is #{new_resource.name}"
registry_key "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" do
values [{
:name => "LegalNoticeCaption",
:type => :string,
:data => "#{new_resource.title_text}"
},
{
:name => "LegalNoticeText",
:type => :string,
:data => "#{new_resource.body_text}"
}]
end
end
action :remove do
registry_key "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" do
values [{
:name => "LegalNoticeCaption",
:type => :string,
:data => ""
},
{
:name => "LegalNoticeText",
:type => :string,
:data => ""
}]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment