Refresh path in powershell

i'm installing among other things sliksvn subversion client using the powershell command below but during the install i assume it must add the svn executable to the PATH environment variable which means svn commands running in the same windows after the install fail due to the svn.exe not being on the PATH, is there any way to reload the PATH variable without have to close and reopen the powershell window?

i could use the full path to svn.exe but i'm trying to avoid this if possible

Install Script

Start-Process -Wait -FilePath "$($pwd.path)\assets\Slik-Subversion-1.9.7-x64.msi" -ArgumentList "/passive";
4

1 Answer

AFAIK, the PATH can be reloaded within Powershell like this:

$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")

or

$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like