Last active
January 15, 2018 01:12
-
-
Save hobbsh/b3737dfa1515bfc3c8483c67f63a74ee to your computer and use it in GitHub Desktop.
Dsiables the EnableUlps and EnableCrossfireAutoLink in Windows 10 Registry for Vega GPUs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Test-RegistryValue { | |
param( | |
[Alias("PSPath")] | |
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] | |
[String]$Path | |
, | |
[Parameter(Position = 1, Mandatory = $true)] | |
[String]$Name | |
, | |
[Switch]$PassThru | |
) | |
process { | |
if (Test-Path $Path) { | |
$Key = Get-Item -LiteralPath $Path | |
if ($Key.GetValue($Name, $null) -ne $null) { | |
if ($PassThru) { | |
Get-ItemProperty $Path $Name | |
} else { | |
$true | |
} | |
} else { | |
$false | |
} | |
} else { | |
$false | |
} | |
} | |
} | |
$registry_path_root = 'HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}' | |
$keys = ("EnableUlps", "EnableCrossfireAutoLink") | |
$cards = ("0000", "0001", "0002", "0003") | |
$value = "0" | |
foreach ($card in $cards) { | |
foreach ($key in $keys) { | |
$path = $registry_path_root + "\" + $card | |
IF(Test-RegistryValue -Path $path -Name $key) { | |
Set-ItemProperty -Path $path -Name $key -Value $value | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment