WinSW-软件服务化

1.1 举例:ApiWintool可执行jar

ApiWintool.exe
ApiWintool.jar
ApiWintool.xml
install.cmd
uninstall.cmd

1.2 举例:ApiWintool.xml

<service>
<!--windows服务id 必须唯一 -->
<id>ApiWintool</id>
<!-- windows服务名称-->
<name>ApiWintool</name>
<!-- 描述 -->
<description>自研发的后台</description>
<!-- 启动的可执行文件 %BASE%为当前demo.exe所在路径-->
<executable>C:\Program Files\Java\jdk1.8.0_192\jre\bin\java.exe</executable>
<!-- 传递给可执行文件的参数-->
<arguments> -jar "%BASE%\ApiWintool.jar"</arguments>
<!--日志模式 -->
<logmode>rotate</logmode>
<!-- 日志文件路径-->
<logpath>%BASE%/logs</logpath>
<!-- 开机自启 -->
<startmode>Automatic</startmode>
</service>

1.3 ApiWintool的install.cmd

@echo.InstallService......
@echo off
@ApiWintool install
@ApiWintool start
@echo off
@echo.Success!

1.4 ApiWintool的uninstall.cmd

@echo.UnInstallService
@echo off
@ApiWintool stop
@ApiWintool uninstall
@echo off
@echo.DeleteSuccess!

最新文章

  1. jquery_DOM笔记
  2. C# 图片的裁剪,两个图片合成一个图片
  3. tesseract-ocr 出现 错误 Please make sure the TESSDATA_PREFIX environment variable is set to the parent d irectory of your &quot;tessdata&quot; directory.解决方案
  4. TreeSet与TreeMap浅解
  5. 安卓--使用Intent实现Activity之间传值与跳转
  6. JAVA线程示范之一种
  7. swift - use backslash to add the value in the string
  8. Apache Tomcat 7.0 Manager APP
  9. HttpWebRequest上传文件(Excel等)
  10. eclipse 使用maven 创建web3.1项目
  11. PHP于DIRECTORY_SEPARATOR任务
  12. 算法模板——splay区间反转 2
  13. IIS 部署ASP.Net, WebAPI, Restful API, PUT/DELETE 报405错解决办法, webapi method not allowed 405
  14. class-k近邻算法kNN
  15. bzoj1493[NOI2007]项链工厂 线段树
  16. npm run dev的错误
  17. 使用OpenLDAP部署目录服务
  18. linux系统的三种网络连接模式
  19. python 的面相对象编程--对应c++
  20. Windows Server 2008配置Network Load Balancing(服务群集)

热门文章

  1. Pollard_Rho算法
  2. 浅谈LCA问题(最近公共祖先)(四种做法)
  3. centos搭建neo4j环境(含java)2021_12
  4. Java入门与进阶 P-3.5+P-3.6
  5. HelloWorld程序的代码编写-Hello World的编译运行
  6. 【推荐】MySQL数据库设计SQL规范
  7. @ControllerAdvice解密请求,加密响应
  8. 真正“搞”懂HTTPS协议18之TLS特性解析
  9. xshell连接时显示“服务器发送了一个意外的数据包。received:3,expected:20“问题的解决方法
  10. C语言知识补充 --来自菜鸟教程的指针复习