Skip to content

Commit

Permalink
remove all fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiezhang1997 committed Mar 12, 2024
1 parent a186e8d commit 2401a61
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
48 changes: 24 additions & 24 deletions vhdbuilder/packer/configure-windows-vhd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -735,30 +735,30 @@ function Update-Registry {
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1327590028 -Value 1 -Type DWORD

Write-Log "Enable 4 fixes in 2024-03B"
$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1114842764 -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of 1114842764 is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1114842764 -Value 1 -Type DWORD

$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HnsPreallocatePortRange -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of HnsPreallocatePortRange is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HnsPreallocatePortRange -Value 1 -Type DWORD

$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 4154935436 -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of 4154935436 is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 4154935436 -Value 1 -Type DWORD

$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 124082829 -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of 124082829 is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 124082829 -Value 1 -Type DWORD
# Write-Log "Enable 4 fixes in 2024-03B"
# $currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1114842764 -ErrorAction Ignore)
# if (![string]::IsNullOrEmpty($currentValue)) {
# Write-Log "The current value of 1114842764 is $currentValue"
# }
# Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1114842764 -Value 1 -Type DWORD

# $currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HnsPreallocatePortRange -ErrorAction Ignore)
# if (![string]::IsNullOrEmpty($currentValue)) {
# Write-Log "The current value of HnsPreallocatePortRange is $currentValue"
# }
# Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HnsPreallocatePortRange -Value 1 -Type DWORD

# $currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 4154935436 -ErrorAction Ignore)
# if (![string]::IsNullOrEmpty($currentValue)) {
# Write-Log "The current value of 4154935436 is $currentValue"
# }
# Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 4154935436 -Value 1 -Type DWORD

# $currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 124082829 -ErrorAction Ignore)
# if (![string]::IsNullOrEmpty($currentValue)) {
# Write-Log "The current value of 124082829 is $currentValue"
# }
# Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 124082829 -Value 1 -Type DWORD
}
}

Expand Down
40 changes: 20 additions & 20 deletions vhdbuilder/packer/test/windows-vhd-content-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -466,26 +466,26 @@ function Test-RegistryAdded {
Write-ErrorWithTimestamp "The registry for 1327590028 is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1114842764)
if ($result.1114842764 -ne 1) {
Write-ErrorWithTimestamp "The registry for 1114842764 is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HnsPreallocatePortRange)
if ($result.HnsPreallocatePortRange -ne 1) {
Write-ErrorWithTimestamp "The registry for HnsPreallocatePortRange is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 4154935436)
if ($result.4154935436 -ne 1) {
Write-ErrorWithTimestamp "The registry for 4154935436 is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 124082829)
if ($result.124082829 -ne 1) {
Write-ErrorWithTimestamp "The registry for 124082829 is not added"
exit 1
}
# $result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 1114842764)
# if ($result.1114842764 -ne 1) {
# Write-ErrorWithTimestamp "The registry for 1114842764 is not added"
# exit 1
# }
# $result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HnsPreallocatePortRange)
# if ($result.HnsPreallocatePortRange -ne 1) {
# Write-ErrorWithTimestamp "The registry for HnsPreallocatePortRange is not added"
# exit 1
# }
# $result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 4154935436)
# if ($result.4154935436 -ne 1) {
# Write-ErrorWithTimestamp "The registry for 4154935436 is not added"
# exit 1
# }
# $result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 124082829)
# if ($result.124082829 -ne 1) {
# Write-ErrorWithTimestamp "The registry for 124082829 is not added"
# exit 1
# }
}
}

Expand Down

0 comments on commit 2401a61

Please sign in to comment.