From ad58d07d917241434a2039bcc80bcdf773f10b6a Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 30 Mar 2020 15:41:42 +0300 Subject: [PATCH] fix environmnet path --- images/win/scripts/Installers/Install-DotnetSDK.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1 index 996887885..d5a414114 100644 --- a/images/win/scripts/Installers/Install-DotnetSDK.ps1 +++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1 @@ -100,10 +100,10 @@ function RunPostInstallationSteps() { Add-MachinePathItem "C:\Program Files\dotnet" # Run script at startup for all users - $cmdDotNetPath = @" + $cmdDotNetPath = @' @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" $cmdDotNetPath | Out-File -Encoding ascii -FilePath $cmdPath