fix environmnet path

This commit is contained in:
Aleksandr Chebotov
2020-03-30 15:41:42 +03:00
parent e6f803abce
commit ad58d07d91

View File

@@ -100,10 +100,10 @@ function RunPostInstallationSteps()
{ {
Add-MachinePathItem "C:\Program Files\dotnet" Add-MachinePathItem "C:\Program Files\dotnet"
# Run script at startup for all users # Run script at startup for all users
$cmdDotNetPath = @" $cmdDotNetPath = @'
@echo off @echo off
SETX PATH "%USERPROFILE%\.dotnet\tools;%PATH%" powershell -executionpolicy bypass -noprofile -command "[System.Environment]::SetEnvironmentVariable('PATH',"""$env:USERPROFILE\.dotnet\tools;$env:PATH""", 'USER')"
"@ '@
$cmdPath = "C:\Program Files\dotnet\userpath.bat" $cmdPath = "C:\Program Files\dotnet\userpath.bat"
$cmdDotNetPath | Out-File -Encoding ascii -FilePath $cmdPath $cmdDotNetPath | Out-File -Encoding ascii -FilePath $cmdPath