From 3cd2b8d0c94bdae7c1f41f8501f8daa4d07519a8 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Sat, 27 Aug 2022 18:42:09 -0700 Subject: [PATCH] ci/windows: Enable developer mode for test container Reviewed-by: Giancarlo Devich Reviewed-by: Sil Vilerino Part-of: --- .gitlab-ci/windows/mesa_deps_test.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci/windows/mesa_deps_test.ps1 b/.gitlab-ci/windows/mesa_deps_test.ps1 index 9badef06e10..5b23b90df4c 100644 --- a/.gitlab-ci/windows/mesa_deps_test.ps1 +++ b/.gitlab-ci/windows/mesa_deps_test.ps1 @@ -169,5 +169,16 @@ Expand-Archive -Path 'DXC.zip' -DestinationPath 'C:\DXC' # No more need to get dxil.dll from the VS install Copy-Item 'C:\DXC\bin\x64\*.dll' -Destination 'C:\Windows\System32' +Get-Date +Write-Host "Enabling developer mode" +# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode +$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" +if (-not(Test-Path -Path $RegistryKeyPath)) { + New-Item -Path $RegistryKeyPath -ItemType Directory -Force +} + +# Add registry value to enable Developer Mode +New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 -Force + Get-Date Write-Host "Complete"