标签:
@echo off title JDK和tuxedo环境变量设置 color 0a set /p inputTUX= [请输入你要设置的tuxedo的安装目录:] if /i "%inputTUX%"=="" set inputJH=%TUXDIR% set /p inputJDK= [请输入你要设置的JDK的安装目录:] if /i "%inputJDK%"=="" set inputJDK=%JAVA_HOME% echo 正在配置环境变量,请稍候...... reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v DDD /t REG_EXPAND_SZ /d "%inputTUX%" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v EEE /t REG_EXPAND_SZ /d "%inputJDK%" /f for,/f,"skip=4 tokens=1,2,*",%%a,in,(‘reg query "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v PATH‘),do,( reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v AAA /t REG_EXPAND_SZ /d "%%c;"%%TUXDIR%%\lib"";""%%TUXDIR%%\bin"";""%%JAVA_HOME%%"";""%%JAVA_HOME%%\bin"" /f ) reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v bbb /t REG_EXPAND_SZ /d ".;"%%JAVA_HOME%%\lib"";""%%JAVA_HOME%%\lib\comm.jar"" /f reg add "HKCU\Environment" /v CCC /t reg_sz /d "//192.168.101.81:7001" /f set /p tmp=环境变量设置成功,请按回车键退出... pause>nul
保存为 :.bat
标签:
原文地址:http://www.cnblogs.com/xrhou12326/p/4606178.html