From 0790ef6e2af691401215c0ecb0a34c792c03fde7 Mon Sep 17 00:00:00 2001 From: Alexey-Ayupov <116575425+Alexey-Ayupov@users.noreply.github.com> Date: Mon, 30 Jun 2025 17:30:31 +0200 Subject: [PATCH] [Windows-2025] Enable permission inheritance for the C: drive (#12467) --- images/windows/scripts/build/Configure-System.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/windows/scripts/build/Configure-System.ps1 b/images/windows/scripts/build/Configure-System.ps1 index 5e144f2d5..dee40ab61 100644 --- a/images/windows/scripts/build/Configure-System.ps1 +++ b/images/windows/scripts/build/Configure-System.ps1 @@ -36,6 +36,14 @@ if ($LASTEXITCODE -ne 0) { throw "Failed to grant Users full control of $env:SystemRoot\Temp" } +# Enable inheritance for the entire C:\ drive +if (Test-IsWin25) { + cmd /c "icacls C:\ /inheritance:e /c /q 2>&1" | Out-Null + if ($LASTEXITCODE -ne 0) { + throw "Failed to enable inheritance for C:\ drive" + } +} + # Registry settings $registrySettings = @( @{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"; Name = "AUOptions"; Value = 1; PropertyType = "DWORD" }