Browse Source

完善脚本

master
VIVIMAN 3 years ago
parent
commit
e8df64f4a0
  1. 6
      src/main/java/com/insigma/service/impl/LinuxTongWebKingBase.java
  2. 2
      src/main/resources/run.bat
  3. 121
      src/main/resources/static/32bit.bat
  4. 87
      src/main/resources/static/64bit.bat

6
src/main/java/com/insigma/service/impl/LinuxTongWebKingBase.java

@ -36,7 +36,7 @@ public class LinuxTongWebKingBase extends Computer implements Database, Middlewa
} }
@Override @Override
public boolean setDbSize(int size) throws Exception { public boolean setDbSize(int size) {
return true; return true;
} }
@ -51,12 +51,12 @@ public class LinuxTongWebKingBase extends Computer implements Database, Middlewa
} }
@Override @Override
public boolean cleanMwCache() throws Exception { public boolean cleanMwCache() {
return true; return true;
} }
@Override @Override
public boolean setMwSize(int permSize, int maxPermSize, int xms, int xmx) throws Exception { public boolean setMwSize(int permSize, int maxPermSize, int xms, int xmx) {
return true; return true;
} }

2
src/main/resources/run.bat

@ -0,0 +1,2 @@
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
java -jar java_tool.jar

121
src/main/resources/static/32bit.bat

@ -1,121 +0,0 @@
%1 mshta vbscript:CreateObject(“Shell.Application”).ShellExecute(“cmd.exe”,``"/c %~s0 ::"``,``""``,“runas”,1)(window.close)&&exit
@Echo Off
Title 32位重置服务注册表手动设置安装路径 & Color 1A
cd %systemroot%\system32
call :IsAdmin
set /p InstallPath_value=请输入公务员系统安装路径(例如D:/hzb2020):
echo 安装路径是%InstallPath_value%
for /f "tokens=2" %%a in ('systeminfo^|findstr 可用的物理内存') do (
for /f "tokens=1,2 delims=," %%y in ("%%a") do if %%y%%z gtr 2048 (set JvmMx_value=1024
set JvmMs_value=512) else (set JvmMx_value=512
set JvmMs_value=256))
echo JvmMs_value是%JvmMs_value%
echo JvmMx_value是%JvmMx_value%
net stop GWY20_Mysql
net stop GWY20_Tomcat
Reg.exe delete "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /f
Reg.exe delete "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /f
Reg.exe delete "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /f
Reg.exe delete "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /f
Reg.exe delete "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /f
Reg.exe delete "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /f
Reg.exe delete "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\mysql\bin\mysqld GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "DisplayName" /t REG_SZ /d "GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "ObjectName" /t REG_SZ /d "LocalSystem" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql\Security" /v "Security" /t REG_BINARY /d "01001480900000009c000000140000003000000002001c000100000002801400ff010f00010100000000000100000000020060000400000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d01020001010000000000050b00000000001800fd01020001020000000000052000000023020000010100000000000512000000010100000000000512000000" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql\Enum" /v "0" /t REG_SZ /d "Root\LEGACY_GWY20_MYSQL\0000" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql\Enum" /v "Count" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql\Enum" /v "NextInstance" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\mysql\bin\mysqld GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /v "DisplayName" /t REG_SZ /d "GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql" /v "ObjectName" /t REG_SZ /d "LocalSystem" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Mysql\Security" /v "Security" /t REG_BINARY /d "01001480900000009c000000140000003000000002001c000100000002801400ff010f00010100000000000100000000020060000400000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d01020001010000000000050b00000000001800fd01020001020000000000052000000023020000010100000000000512000000010100000000000512000000" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\mysql\bin\mysqld GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "DisplayName" /t REG_SZ /d "GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "ObjectName" /t REG_SZ /d "LocalSystem" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql\Security" /v "Security" /t REG_BINARY /d "01001480900000009c000000140000003000000002001c000100000002801400ff010f00010100000000000100000000020060000400000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d01020001010000000000050b00000000001800fd01020001020000000000052000000023020000010100000000000512000000010100000000000512000000" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql\Enum" /v "0" /t REG_SZ /d "Root\LEGACY_GWY20_MYSQL\0000" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql\Enum" /v "Count" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql\Enum" /v "NextInstance" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "Jvm" /t REG_SZ /d "%InstallPath_value%\tomcat8/JDK1.8\jre\bin\server\jvm.dll" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "Options" /t REG_MULTI_SZ /d "-Dcatalina.home=%InstallPath_value%\tomcat8\0-Dcatalina.base=%InstallPath_value%\tomcat8\0-Djava.endorsed.dirs=%InstallPath_value%\tomcat8\endorsed\0-Djava.io.tmpdir=%InstallPath_value%\tomcat8\temp\0-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager\0-Djava.util.logging.config.file=%InstallPath_value%\tomcat8\conf\logging.properties\0-Dfile.encoding=GBK\0-XX:PermSize=128m\0-XX:MaxPermSize=256m" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "Classpath" /t REG_SZ /d "%InstallPath_value%\tomcat8\bin\bootstrap.jar;%InstallPath_value%\tomcat8\bin\tomcat-juli.jar" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "JvmMs" /t REG_DWORD /d "%JvmMs_value%" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "JvmMx" /t REG_DWORD /d "%JvmMx_value%" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Log" /v "Path" /t REG_SZ /d "%InstallPath_value%\tomcat8\logs" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Log" /v "StdError" /t REG_SZ /d "auto" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Log" /v "StdOutput" /t REG_SZ /d "auto" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "WorkingPath" /t REG_SZ /d "%InstallPath_value%\tomcat8" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "Class" /t REG_SZ /d "org.apache.catalina.startup.Bootstrap" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "Params" /t REG_MULTI_SZ /d "start" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "Mode" /t REG_SZ /d "jvm" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "WorkingPath" /t REG_SZ /d "%InstallPath_value%\tomcat8" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "Class" /t REG_SZ /d "org.apache.catalina.startup.Bootstrap" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "Params" /t REG_MULTI_SZ /d "stop" /f
Reg.exe add "HKLM\SOFTWARE\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "Mode" /t REG_SZ /d "jvm" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\tomcat8\bin\Tomcat8.exe //RS//GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "DisplayName" /t REG_SZ /d "GWY_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "DependOnService" /t REG_MULTI_SZ /d "Tcpip\0Afd" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "DependOnGroup" /t REG_MULTI_SZ /d "" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "ObjectName" /t REG_SZ /d "NT Authority\LocalService" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "Description" /t REG_SZ /d "Apache Tomcat 8.5.55 Server - https://tomcat.apache.org/" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat\Parameters" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat\Security" /v "Security" /t REG_BINARY /d "01001480900000009c000000140000003000000002001c000100000002801400ff010f00010100000000000100000000020060000400000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d01020001010000000000050b00000000001800fd01020001020000000000052000000023020000010100000000000512000000010100000000000512000000" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat\Enum" /v "0" /t REG_SZ /d "Root\LEGACY_GWY20_TOMCAT\0000" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat\Enum" /v "Count" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat\Enum" /v "NextInstance" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "Start" /t REG_DWORD /d "3" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\tomcat8\bin\Tomcat8.exe //RS//GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "DisplayName" /t REG_SZ /d "Apache Tomcat 8.5 GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "DependOnService" /t REG_MULTI_SZ /d "Tcpip\0Afd" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "DependOnGroup" /t REG_MULTI_SZ /d "" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "ObjectName" /t REG_SZ /d "NT Authority\LocalService" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat" /v "Description" /t REG_SZ /d "Apache Tomcat 8.5.55 Server - https://tomcat.apache.org/" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat\Parameters" /f
Reg.exe add "HKLM\SYSTEM\ControlSet002\Services\GWY20_Tomcat\Security" /v "Security" /t REG_BINARY /d "01001480900000009c000000140000003000000002001c000100000002801400ff010f00010100000000000100000000020060000400000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d01020001010000000000050b00000000001800fd01020001020000000000052000000023020000010100000000000512000000010100000000000512000000" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\tomcat8\bin\Tomcat8.exe //RS//GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "DisplayName" /t REG_SZ /d "GWY_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "DependOnService" /t REG_MULTI_SZ /d "Tcpip\0Afd" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "DependOnGroup" /t REG_MULTI_SZ /d "" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "ObjectName" /t REG_SZ /d "NT Authority\LocalService" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "Description" /t REG_SZ /d "Apache Tomcat 8.5.55 Server - https://tomcat.apache.org/" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat\Parameters" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat\Security" /v "Security" /t REG_BINARY /d "01001480900000009c000000140000003000000002001c000100000002801400ff010f00010100000000000100000000020060000400000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d01020001010000000000050b00000000001800fd01020001020000000000052000000023020000010100000000000512000000010100000000000512000000" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat\Enum" /v "0" /t REG_SZ /d "Root\LEGACY_GWY20_TOMCAT\0000" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat\Enum" /v "Count" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat\Enum" /v "NextInstance" /t REG_DWORD /d "1" /f
Exit
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & Echo You must have administrator rights to continue ...
Pause & Exit
)
Cls
goto:eof

87
src/main/resources/static/64bit.bat

@ -1,87 +0,0 @@
%1 mshta vbscript:CreateObject(“Shell.Application”).ShellExecute(“cmd.exe”,``"/c %~s0 ::"``,``""``,“runas”,1)(window.close)&&exit
@Echo Off
Title 32位重置服务注册表手动设置安装路径 & Color 1A
cd %systemroot%\system32
call :IsAdmin
set /p InstallPath_value=请输入公务员系统安装路径(例如D:/hzb2020):
echo 安装路径是%InstallPath_value%
for /f "tokens=2" %%a in ('systeminfo^|findstr 可用的物理内存') do (
for /f "tokens=1,2 delims=," %%y in ("%%a") do if %%y%%z gtr 2048 (set JvmMx_value=1024
set JvmMs_value=512) else (set JvmMx_value=512
set JvmMs_value=256)
)
echo JvmMs_value是%JvmMs_value%
echo JvmMx_value是%JvmMx_value%
net stop GWY20_Mysql
net stop GWY20_Tomcat
Reg.exe delete "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /f
Reg.exe delete "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /f
Reg.exe delete "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /f
Reg.exe delete "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /f
Reg.exe delete "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\mysql\bin\mysqld GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "DisplayName" /t REG_SZ /d "GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "WOW64" /t REG_DWORD /d "332" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Mysql" /v "ObjectName" /t REG_SZ /d "LocalSystem" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\tomcat8\bin\Tomcat8.exe //RS//GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "DisplayName" /t REG_SZ /d "GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "DependOnService" /t REG_MULTI_SZ /d "Tcpip\0Afd" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "WOW64" /t REG_DWORD /d "332" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "ObjectName" /t REG_SZ /d "NT Authority\LocalService" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat" /v "Description" /t REG_SZ /d "Apache Tomcat 8.5.55 Server - https://tomcat.apache.org/" /f
Reg.exe add "HKLM\SYSTEM\ControlSet001\Services\GWY20_Tomcat\Parameters" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\mysql\bin\mysqld --defaults-file=%InstallPath_value%\mysql\my.ini GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "DisplayName" /t REG_SZ /d "GWY20_Mysql" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "WOW64" /t REG_DWORD /d "332" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Mysql" /v "ObjectName" /t REG_SZ /d "LocalSystem" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "Type" /t REG_DWORD /d "16" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "Start" /t REG_DWORD /d "2" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "ErrorControl" /t REG_DWORD /d "1" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "ImagePath" /t REG_EXPAND_SZ /d "%InstallPath_value%\tomcat8\bin\Tomcat8.exe //RS//GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "DisplayName" /t REG_SZ /d "GWY20_Tomcat" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "DependOnService" /t REG_MULTI_SZ /d "Tcpip\0Afd" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "WOW64" /t REG_DWORD /d "332" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "ObjectName" /t REG_SZ /d "NT Authority\LocalService" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat" /v "Description" /t REG_SZ /d "Apache Tomcat 8.5.55 Server - https://tomcat.apache.org/" /f
Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\GWY20_Tomcat\Parameters" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "Jvm" /t REG_SZ /d "%InstallPath_value%\tomcat8/JDK1.8/jre\bin\server\jvm.dll" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "Options" /t REG_MULTI_SZ /d "-Dcatalina.home=%InstallPath_value%\tomcat8\0-Dcatalina.base=%InstallPath_value%\tomcat8\0-Djava.endorsed.dirs=%InstallPath_value%\tomcat8\endorsed\0-Djava.io.tmpdir=%InstallPath_value%\tomcat8\temp\0-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager\0-Djava.util.logging.config.file=%InstallPath_value%\tomcat8\conf\logging.properties\0-Dfile.encoding=GBK\0-XX:PermSize=128m\0-XX:MaxPermSize=256m" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "Classpath" /t REG_SZ /d "%InstallPath_value%\tomcat8\bin\bootstrap.jar;%InstallPath_value%\tomcat8\bin\tomcat-juli.jar" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "JvmMs" /t REG_DWORD /d "%JvmMs_value%" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Java" /v "JvmMx" /t REG_DWORD /d "%JvmMx_value%" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Log" /v "Path" /t REG_SZ /d "%InstallPath_value%\tomcat8\logs" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Log" /v "StdError" /t REG_SZ /d "auto" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Log" /v "StdOutput" /t REG_SZ /d "auto" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "WorkingPath" /t REG_SZ /d "%InstallPath_value%\tomcat8" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "Class" /t REG_SZ /d "org.apache.catalina.startup.Bootstrap" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "Params" /t REG_MULTI_SZ /d "start" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Start" /v "Mode" /t REG_SZ /d "jvm" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "WorkingPath" /t REG_SZ /d "%InstallPath_value%\tomcat8" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "Class" /t REG_SZ /d "org.apache.catalina.startup.Bootstrap" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "Params" /t REG_MULTI_SZ /d "stop" /f
Reg.exe add "HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\GWY20_Tomcat\Parameters\Stop" /v "Mode" /t REG_SZ /d "jvm" /f
echo 请重启电脑。
pause
Exit
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & 您必须用管理员权限运行...
Pause & Exit
)
Cls
goto:eof
Loading…
Cancel
Save