Skip to content

Commit 36c8e5b

Browse files
authored
Add 11b non-sec reg keys (#7348)
1 parent afc2f37 commit 36c8e5b

File tree

3 files changed

+63
-4
lines changed

3 files changed

+63
-4
lines changed

vhdbuilder/packer/windows/components_json_helpers.ps1

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,16 @@ function LogReleaseNotesForWindowsRegistryKeys
286286
$names = $releaseNotesToSet[$key]
287287
foreach ($name in $names)
288288
{
289-
$value = (Get-ItemProperty -Path $key -Name $name).$name
290-
$logLines += ("`t`t{0} : {1}" -f $name, $value)
289+
# Set error action to stop so that if the key or name doesn't exist we get notified - as this indicates an issue
290+
# with setting the field
291+
try {
292+
$value = (Get-ItemProperty -Path $key -Name $name -ErrorAction Stop).$name
293+
Write-Host "Found registry key value for $key\$name : $value"
294+
$logLines += ("`t`t{0} : {1}" -f $name, $value)
295+
}
296+
catch {
297+
throw "Failed to get registry key value for $key\$name. $_"
298+
}
291299
}
292300
}
293301

@@ -403,4 +411,4 @@ function GetAllCachedThings {
403411
}
404412

405413
return ($items | Sort-Object -Unique )
406-
}
414+
}

vhdbuilder/packer/windows/configure-windows-vhd.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,9 @@ try
10441044
Get-ToolsToVHD
10451045
Get-PrivatePackagesToCacheOnVHD
10461046
Install-WindowsCiliumNetworking
1047+
# Update all the registry keys again in case the steps in between reset them. Ok, some of the steps in between do reset them. But there's a risk that the steps also need
1048+
# the keys set. So we kinda have to do both now :cry:
1049+
Update-Registry
10471050
Log-ReofferUpdate
10481051
}
10491052
"3" {

vhdbuilder/packer/windows/windows_settings.json

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,54 @@
841841
"Name": "403177103",
842842
"Value": "1",
843843
"Type": "DWORD"
844+
},
845+
{
846+
"Comment": "2025-11B",
847+
"WindowsSkuMatch": "2022*",
848+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Policies\\Microsoft\\FeatureManagement\\Overrides",
849+
"Name": "2113538702",
850+
"Value": "1",
851+
"Type": "DWORD"
852+
},
853+
{
854+
"Comment": "2025-11B",
855+
"WindowsSkuMatch": "2022*",
856+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Policies\\Microsoft\\FeatureManagement\\Overrides",
857+
"Name": "2854356110",
858+
"Value": "1",
859+
"Type": "DWORD"
860+
},
861+
{
862+
"Comment": "2025-11B",
863+
"WindowsSkuMatch": "2022*",
864+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Policies\\Microsoft\\FeatureManagement\\Overrides",
865+
"Name": "300542606",
866+
"Value": "1",
867+
"Type": "DWORD"
868+
},
869+
{
870+
"Comment": "2025-11B",
871+
"WindowsSkuMatch": "23H2*",
872+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Policies\\Microsoft\\FeatureManagement\\Overrides",
873+
"Name": "1898182287",
874+
"Value": "1",
875+
"Type": "DWORD"
876+
},
877+
{
878+
"Comment": "2025-11B",
879+
"WindowsSkuMatch": "23H2*",
880+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Policies\\Microsoft\\FeatureManagement\\Overrides",
881+
"Name": "916190351",
882+
"Value": "1",
883+
"Type": "DWORD"
884+
},
885+
{
886+
"Comment": "2025-11B",
887+
"WindowsSkuMatch": "23H2*",
888+
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Policies\\Microsoft\\FeatureManagement\\Overrides",
889+
"Name": "3063948942",
890+
"Value": "1",
891+
"Type": "DWORD"
844892
}
845893
]
846-
}
894+
}

0 commit comments

Comments
 (0)