Files
runner-images/images/windows/scripts/build/Configure-DeveloperMode.ps1
Vasilii Polikarpov 7fe65a2204 [Windows] Apply code style rules to Windows scripts (#8957)
* Apply code style rules to Windows scripts

* Fix typo

* Fix configure-toolset script

* Fix parameters in Msys2 installation script

* Improve log readability

* Remove broken exit code validation
2023-12-11 22:23:36 +01:00

14 lines
772 B
PowerShell

################################################################################
## File: Configure-DeveloperMode.ps1
## Desc: Enables Developer Mode by toggling registry setting. Developer Mode is required to enable certain tools (e.g. WinAppDriver).
################################################################################
# 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