ScoopInstaller_Main/scripts/vulkan/install-vk-layers.ps1
Locietta ab5ae2668a
vulkan@1.3.231.1: Add registry notes and cleanup (Fix #4218) (#4222)
* vulkan@1.3.231.1: Add registry notes and cleanup (Fix #4218)

* vulkan: Update to version 1.3.236.0

* vulkan: workaround CI error
2022-12-16 11:42:31 +05:30

16 lines
657 B
PowerShell

if ($global -and (-not $is_admin)) {
Write-Host "ERROR write registries for global installation needs admin rights!" -ForegroundColor DarkRed
exit 1
}
$reg_root = if ($global) { [Microsoft.Win32.Registry]::LocalMachine } else { [Microsoft.Win32.Registry]::CurrentUser }
$vk_explicit_reg_path = 'SOFTWARE\Khronos\Vulkan\ExplicitLayers'
$vk_explicit_reg = $reg_root.CreateSubKey($vk_explicit_reg_path)
$vk_layers = Get-ChildItem -Path $vulkan_bin -Filter '*.json' | ForEach-Object { $_.FullName }
foreach ($vk_layer in $vk_layers) {
$vk_explicit_reg.SetValue($vk_layer, 0, [Microsoft.Win32.RegistryValueKind]::DWord)
}
$vk_explicit_reg.Close()