-
-
Save healeyio/1b646298fc33cb5b7638 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$key = "HKCU:\SOFTWARE\Locky" | |
If ((Test-Path $key) -ne $true) { | |
# Create registry Key | |
New-Item -Path $key -ItemType Key | |
# Setting ACL | |
$a = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name | |
$acl = Get-Acl $key | |
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ($a,"FullControl","Deny") | |
$acl.SetAccessRule($rule) | |
$acl | Set-Acl -Path $key | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably not likely to work as locky (reportedly) now has an alternate registry key.
https://twitter.com/x0rz/status/713437408205926400