diff options
Diffstat (limited to 'coin/provisioning/common/helpers.ps1')
-rw-r--r-- | coin/provisioning/common/helpers.ps1 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/coin/provisioning/common/helpers.ps1 b/coin/provisioning/common/helpers.ps1 index 1d624243..d901e370 100644 --- a/coin/provisioning/common/helpers.ps1 +++ b/coin/provisioning/common/helpers.ps1 @@ -92,6 +92,7 @@ function Download [string] $CachedUrl = $(BadParam("the locally cached URL")), [string] $Destination = $(BadParam("a download target location")) ) + $ProgressPreference = 'SilentlyContinue' try { if ($CachedUrl.StartsWith("http")) { Invoke-WebRequest -UseBasicParsing $CachedUrl -OutFile $Destination @@ -109,5 +110,17 @@ function Add-Path [string]$Path ) echo "Adding $Path to Path" - [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$Path", [EnvironmentVariableTarget]::Machine) + + $oldPath = [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + [Environment]::SetEnvironmentVariable("Path", $oldPath + ";$Path", [EnvironmentVariableTarget]::Machine) +} + +function is64bitWinHost +{ + if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) { + return 1 + } + else { + return 0 + } } |