Not being a windows VBS writer (but user of Windows shells) I use multiple different versions of third-party code which require me to set windows shell environment variables, specifically these are Java related
Looking at the following question I began to ponder what I would need to do to quickly change shell environment variables with a single command. Eg:
In mode A i have
ANT_HOME=c:\foo\bar\ant-1.5.1
JAVA_HOME=c:\foo\java\1.4
PATH=c:\foo\java\1.4\bin;c:\foo\bar\ant-1.5.1\bin
In mode B to develop other things, I desire a quick switch to the following (also culling the PATH settings for the above in the process)
ANT_HOME=c:\foo\bar\ant-1.6.1
JAVA_HOME=c:\foo\java\1.6
PATH=c:\foo\java\1.6\bin;c:\foo\bar\ant-1.6.1\bin
To augment the script in the referenced question I'm guessing some path processing using the Split command and so forth will be necessary. Has anyone already done something like this that they would be willing to share?
I obviously can't just kill the whole PATH since there are numerous other items in the PATH which I want to preserve which are used.