After trying out 
http://mnaoumov.wordpress.com/2012/07/24/powershell-add-directory-to-environment-path-variable/
 
I realized it's smart enough to:

1. Read the old PATH value from the registry (thus getting around the 
facter path problem)
2. Only add the new dir if it's not already in PATH
3. Broadcast PATH change to new cmd prompts without reboot

So now everything is working just as desired. I've written a a Puppet 
defined type that takes a zip file and the desired home directory and home 
env var name, does the unzip, sets the home env var,and adds home\bin to 
PATH. Using it to automate install of groovy, gradle, and so on.

Really appreciate your help.

Jeff

-- 
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/-/BNYc0LcORgoJ.
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.

Reply via email to