mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[Windows] Use common approach to set machine vars (#8830)
This commit is contained in:
committed by
GitHub
parent
045a0de8e2
commit
07e8da79f8
@@ -78,7 +78,7 @@ Write-Host "Expand Chrome WebDriver archive (without using directory names)..."
|
||||
Extract-7Zip -Path $ChromeDriverArchPath -DestinationPath $ChromeDriverPath -ExtractMethod "e"
|
||||
|
||||
Write-Host "Setting the environment variables..."
|
||||
setx ChromeWebDriver "$ChromeDriverPath" /M
|
||||
[Environment]::SetEnvironmentVariable("ChromeWebDriver", $ChromeDriverPath, "Machine")
|
||||
|
||||
$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\'
|
||||
$PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path'
|
||||
|
||||
Reference in New Issue
Block a user