Skip to content

Commit

Permalink
Merge pull request #1119 from Ana06/legal-notice
Browse files Browse the repository at this point in the history
[common] Add VM-Set-Legal-Notice helper function
  • Loading branch information
Ana06 authored Aug 22, 2024
2 parents 9dffd97 + fed37bb commit a1642e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common.vm/common.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>common.vm</id>
<version>0.0.0.20240612</version>
<version>0.0.0.20240821</version>
<description>Common libraries for VM-packages</description>
<authors>Mandiant</authors>
</metadata>
Expand Down
11 changes: 11 additions & 0 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1789,3 +1789,14 @@ function VM-Uninstall-With-Pip {
VM-Pip-Uninstall $toolName
VM-Remove-Tool-Shortcut $toolName $category
}

function VM-Set-Legal-Notice {
param (
[Parameter(Mandatory=$true)]
[string[]]$legalnoticetext
)
$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'
New-ItemProperty -Path $RegistryPath -Name legalnoticecaption -Value "Terms and Conditions" -Force
New-ItemProperty -Path $RegistryPath -Name legalnoticetext -Value $legalnoticetext -Force
}

0 comments on commit a1642e4

Please sign in to comment.