然后,把它命名成你要创建的(比如: "apache-ser.exe",这是apache做事)
2、将重命名后的apache-ser.exe复制到apache的安装目录(我这里是 "C:\phpStudy\PHPTutorial\Apache\bin")
3、在同一个目录下创建一个Windows Service Wrapper的XML配置文件,名称必须与第一步重命名时利用的名称同等(比如我这里是 apache-ser.xml")

文件内容如下:
<service>
<id>apache-ser</id>
<name>apache-ser</name>
<description>apache-ser</description>
<executable>C:\phpStudy\PHPTutorial\Apache\bin\httpd.exe</executable>
</service>
4、命令行下实行以下命令,以便将其安装成Windows做事。
C:\phpStudy\PHPTutorial\Apache\bin> apache-ser.exe install
5、打开我的电脑 右键 -> 管理 -> 做事 -> 有了个 apache-ser,其启动类型设置为自动。
补充:
Windows Servcie Wrapper的命令格式如下:
# 安装做事
CMD:\> apache-ser.exe install
# 卸载做事
CMD:\> apache-ser.exe uninstall
# 启动做事
CMD:\> apache-ser.exe start
# 停滞做事
CMD:\> apache-ser.exe stop