diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 27d30cb31ea..3626d5b0f28 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -122,6 +122,16 @@ function ConvertTo-LongPath { return $Path } +foreach ($tmpVar in @('TEMP', 'TMP')) { + $current = [Environment]::GetEnvironmentVariable($tmpVar) + if ($current) { + $expanded = ConvertTo-LongPath $current + if ($expanded -and $expanded -ne $current) { + Set-Item -Path "Env:$tmpVar" -Value $expanded + } + } +} + # ============================================================================ # Configuration # ============================================================================