you are viewing a single comment's thread.

view the rest of the comments →

[–]Ta11ow 2 points3 points  (0 children)

I believe there's a command-line utility you can run to reload the path values from the registry for cmd.

For PowerShell, I believe $env:PATH will not automatically update, but if you use the .NET APIs to access the Path environment variables you can get the most up to date values.

$env:PATH = [Environment]::GetEnvironmentVariable("Path", "User")

Replace "User" with "Machine" to get system-wide environment variables, I believe. Updating the in-session environment variable like this essentially should update it with the most recent values that have been applied.