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