Hallo,
ich habe eine Frage bezüglich der Verteilung von Berechtigungen im Registry per Script.
HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage
In diesem Pfad sollen die Berechtigungen DAC schreiben, Besitzer festlegen, Wert festlegen und Unterschlüssel erstellen für "ALLE ANWEDUNGSPAKETE" erlaubt werden.
Den Wert, sowie den Unterschlüssel kann ich wie folgt festlegen:
function MakeACE() {
# S-1-15-2-1 is WELL_KNOWN_SID_TYPE::WinBuiltinAnyPackageSid, "APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES".
# The self-documenting NTAccount type results in an object that "cannot be translated".
$id = New-Object System.Security.Principal.SecurityIdentifier("S-1-15-2-1")
New-Object System.Security.AccessControl.RegistryAccessRule($id,
[System.Security.AccessControl.RegistryRights]::SetValue,
[System.Security.AccessControl.InheritanceFlags]::ContainerInherit,
[System.Security.AccessControl.PropagationFlags]::None,
[System.Security.AccessControl.AccessControlType]::Allow)
}
function GrantRequiredAccess($key) {
$acl = Get-Acl $key
$acl.AddAccessRule((MakeACE))
Set-Acl $key $acl
}
# All Windows 10, since Microsoft apparently managed to break build 10240 as well in December 2015, after having shipped 10586 broken from the start.
if ([Environment]::OSVersion.Version.Major -eq 10) {
GrantRequiredAccess "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage"
}
function MakeACE() {
# S-1-15-2-1 is WELL_KNOWN_SID_TYPE::WinBuiltinAnyPackageSid, "APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES".
# The self-documenting NTAccount type results in an object that "cannot be translated".
$id = New-Object System.Security.Principal.SecurityIdentifier("S-1-15-2-1")
New-Object System.Security.AccessControl.RegistryAccessRule($id,
[System.Security.AccessControl.RegistryRights]::CreateSubkey,
[System.Security.AccessControl.InheritanceFlags]::ContainerInherit,
[System.Security.AccessControl.PropagationFlags]::None,
[System.Security.AccessControl.AccessControlType]::Allow)
}
function GrantRequiredAccess($key) {
$acl = Get-Acl $key
$acl.AddAccessRule((MakeACE))
Set-Acl $key $acl
}
# All Windows 10, since Microsoft apparently managed to break build 10240 as well in December 2015, after having shipped 10586 broken from the start.
if ([Environment]::OSVersion.Version.Major -eq 10) {
GrantRequiredAccess "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage"
}
____
Jedoch ist nun die Frage, wie ich das ganze für DAC schreiben und Besitzer festlegen umsetzen kann.
Ziel des Ganzes ist es die Windows Apps wieder zum laufen zu bekommen, trotz RoamingProfil
Gruß
Marcel