---
title: "制作可运行于NT服务的过程。"
author: "ileson"
date: "2014-03-25T15:54:53Z"
tags: []
categories: ["研发管理"]
slug: "nt"
draft: false
lastmod: "2014-03-25T15:57:19Z"
id: 2036431
url: "https://ileson.iteye.com/blog/2036431"
---

文件列表：

![](http://dl2.iteye.com/upload/attachment/0095/3055/2032411f-0e8a-3259-aa9f-8799e636a739.png)


文件说明：
<span style="color:blue">Server.exe</span>                     --这是我写的符合在系统服务里跑的应用程序。

<span style="color:blue">将Server注册成系统服务.bat</span>       --这个是将 Server.exe 注册到系统服务的批处理


```BAT

@echo off

set "curdir=%~dp0"
set "servName=NetServer"

sc create %servName% binPath= "%curdir%Server.exe" depend= RpcSs start= auto

sc start %servName%

::pause

```


<span style="color:blue">setup.exe</span>                      --我用Inno Setup 作的一个安装包。