cd %TOMCAT_HOME%in
service.bat install file -- 注册服务,名称:file。需要提前把 tomcat8w.exe 修改为 filew.exe
此时发现,可执行文件的路径是 tomcat8.exe。运行的时候,在任务管理器中映像名称也就是 tomcat8.exe;如果注册多个 tomcat 服务时,不易区分
修改上述 tomcat8.exe 为 file.exe,有以下两个方式,事先复制 tomcat8.exe,新的文件改名为:file.exe
1)首先需要移除服务:service.bat remove/uninstall file -- 移除名字为 file 的服务
替换 service.bat 中 set "EXECUTABLE=%CATALINA_HOME%infile.exe" 中的 tomcat8.exe 为 file.exe
注册服务:service.bat install file
2)在注册表中找到服务 file (HKEY_LOCAL_MACHINESYSTEM*servicesfile),修改 ImagePath 中 tomcat8.exe 为 file.exe