summaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/windows/helpers.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'coin/provisioning/common/windows/helpers.ps1')
-rw-r--r--coin/provisioning/common/windows/helpers.ps112
1 files changed, 12 insertions, 0 deletions
diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1
index f5318bcb..6e8e0365 100644
--- a/coin/provisioning/common/windows/helpers.ps1
+++ b/coin/provisioning/common/windows/helpers.ps1
@@ -136,6 +136,18 @@ function Add-Path
$Env:PATH = [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
}
+function Prepend-Path
+{
+ Param (
+ [string]$Path
+ )
+ Write-Host "Adding $Path to Path"
+
+ $oldPath = [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
+ [Environment]::SetEnvironmentVariable("Path", "$Path;" + $oldPath, [EnvironmentVariableTarget]::Machine)
+ $Env:PATH = [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
+}
+
function Set-EnvironmentVariable
{
Param (