一键设置环境变量

set sysenv=CreateObject("WScript.Shell")

sysenv.Environment("system").Item("CYGWIN_HOME")="E:\APP\cygwin"
sysenv.Environment("system").Item("M2_HOME")="E:\APP\maven"
sysenv.Environment("system").Item("_SVN_HOME")="E:\APP\svn"
sysenv.Environment("system").Item("GIT_HOME")="E:\APP\git"
sysenv.Environment("system").Item("ANT_HOME")="E:\APP\ant"
sysenv.Environment("system").Item("FB_HOME")="E:\APP\findbugs"
sysenv.Environment("system").Item("JAVA_HOME")="E:\Java\JDK\jdk7"

sysenv.Environment("system").Item("ORACLE_HOME")="E:\APP\instantclient"
sysenv.Environment("system").Item("TNS_ADMIN")="E:\APP\instantclient"
sysenv.Environment("system").Item("NLS_lANG")="AMERICAN_AMERICA.AL32UTF8"

sysenv.Environment("system").Item("Classpath")=".;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar"
sysenv.Environment("system").Item("HOME")="E:\DOC"

path=".;%CYGWIN_HOME%\bin;%_SVN_HOME%\bin;%ANT_HOME%\bin;%M2_HOME%\bin;%GIT_HOME%\bin;%JAVA_HOME%\bin;%FB_HOME%\bin;%TNS_ADMIN%;"
path=path&"C:\Windows\system32;C:\Windows;"

sysenv.Environment("system").Item("Path")=path
保存为env.vbs

你可能感兴趣的:(环境变量)