[C:\SeleniumWebDrivers\ChromeDriver] has been added to [Path] env variable

This commit is contained in:
Andrey Mishechkin
2019-12-25 22:17:56 +04:00
parent 72c8000241
commit 263fd30c27
3 changed files with 5 additions and 0 deletions

View File

@@ -50,5 +50,10 @@ setx IEWebDriver "C:\SeleniumWebDrivers\IEDriver" /M;
setx GeckoWebDriver "C:\SeleniumWebDrivers\GeckoDriver" /M;
setx ChromeWebDriver "C:\SeleniumWebDrivers\ChromeDriver" /M;
$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\';
$PathValue = Get-ItemPropertyValue -Path $reg -Name 'Path';
$PathValue += ";C:\SeleniumWebDrivers\ChromeDriver";
Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue;
exit 0;