.Net Windows服务安装过程

  1. 编写完成的windows服务会在项目目录下的bin/Debug下有个exe程序
    .Net Windows服务安装过程

  2. 以管理员身份运行cmd
    .Net Windows服务安装过程

  3. 找到目录C:\Windows\Microsoft.NET\Framework
    .Net Windows服务安装过程

  4. 找到项目对应的Framework版本

  5. 执行c:

  6. 执行 cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
    .Net Windows服务安装过程

  7. 执行installutil E:\xiaoyunchun\bin\Debug\Gate_scanning.exe
    此处E:\xiaoyunchun\bin\Debug\Gate_scanning.exe 为你的项目地址下的 Debug中的exe程序地址
    .Net Windows服务安装过程

  8. 提示这样则安装成功
    .Net Windows服务安装过程

  9. 右键此电脑打开管理 打开服务 启动刚刚安装的windows服务即可
    .Net Windows服务安装过程