Hi,
Still struggling to set the Global PATH variable in a nice way.
I set the path using PowerShell (a script which is deployed and executed by puppet), but I imagine you could do something similar with ruby and the win32 api:
Function Set-Path {
Param([Parameter(Mandatory=$true)][string]$component,
[Parameter(Mandatory=$false)][string]$variable='path',
[Parameter(Mandatory=$false)][string]$target='Machine')
$path = [Environment]::GetEnvironmentVariable($variable,
$target).split(';')
if ($path -notcontains $component) {
$path += $component
[Environment]::SetEnvironmentVariable($variable,
[string]::join(';', $path),
$target)
}
}
Cheers,
Paul