vs2012创建Windows服务
生活随笔
收集整理的這篇文章主要介紹了
vs2012创建Windows服务
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、創建一個Windows Service
1、創建Windows Service項目
創建好了如下圖,
?
二、創建服務安裝程序
打開Service1.cs
右鍵,點擊安裝程序
選定“serviceProcessInstaller1”,設置Account屬性值為“LocalSystem”,LocalSystem是服務中的最高權限,其它權限相對低一些,相關內容可以查詢資料;
右鍵serviceInsraller1,選擇屬性,修改服務名和說明
三、安裝
生成后,打開
輸入InstallUtil.exe?C:\Users\xxxxx\Desktop\WindowsService1\WindowsService1\bin\Debug\WindowsService1.exe
?
卸載installutil /u?C:\Users\xxxxx\Desktop\WindowsService1\WindowsService1\bin\Debug\WindowsService1.exe
?
轉載于:https://www.cnblogs.com/fanyun/p/4329440.html
總結
以上是生活随笔為你收集整理的vs2012创建Windows服务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: zabbix—安装agent客户端(li
- 下一篇: 数学之美笔记(二十)