Last active
February 17, 2016 17:59
-
-
Save jtattermusch/5c078dafb68e7fb64627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on http://www.smithii.com/node/44 | |
# ensure correct loading of env vars | |
pushd . >/dev/null | |
for __dir in \ | |
/proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session\ Manager/Environment \ | |
/proc/registry/HKEY_CURRENT_USER/Environment | |
do | |
cd "$__dir" | |
for __var in * | |
do | |
__var=`echo $__var | tr '[a-z]' '[A-Z]'` | |
test -z "${!__var}" && export $__var="`cat $__var`" >/dev/null 2>&1 | |
done | |
done | |
unset __dir | |
unset __var | |
popd >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment