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 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/8eWtz9QMboIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.