mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-08-23 08:02:07 +00:00
fix(store-search): correct deny permission removal in undo path (#684)
This commit is contained in:
@@ -158,9 +158,14 @@ function EnableStoreSearchSuggestions {
|
|||||||
$acl = Get-Acl -Path $StoreAppsDatabase
|
$acl = Get-Acl -Path $StoreAppsDatabase
|
||||||
$denyRules = @(
|
$denyRules = @(
|
||||||
$acl.Access | Where-Object {
|
$acl.Access | Where-Object {
|
||||||
$_.AccessControlType -eq [System.Security.AccessControl.AccessControlType]::Deny -and
|
if ($_.AccessControlType -ne [System.Security.AccessControl.AccessControlType]::Deny) { return $false }
|
||||||
(($_.FileSystemRights -band [System.Security.AccessControl.FileSystemRights]::FullControl) -ne 0) -and
|
if (($_.FileSystemRights -band [System.Security.AccessControl.FileSystemRights]::FullControl) -eq 0) { return $false }
|
||||||
(try { $_.IdentityReference.Translate([System.Security.Principal.SecurityIdentifier]) -eq $everyoneSid } catch { $false })
|
try {
|
||||||
|
return ($_.IdentityReference.Translate([System.Security.Principal.SecurityIdentifier]) -eq $everyoneSid)
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return $false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user