把应用程序设置成winodws服务

把应用程序设置成winodws服务的命令如下

sc create FileMonitorService type= own start= auto binpath= E:\learn_project\WindowsService1\FileMonitorService\bin\Debug\FileMonitorService.exe displayname= FileMonitorService

然后到服务里启动这个服务就可以了

posted @ 2015-09-20 11:25  深度C++  阅读(140)  评论(0)    收藏  举报