安装卸载服务

安装:
sc create test3 binPath= "C:\Users\Administrator\Desktop\win32srvDemo\win32srvdemo\Debug\win32srvDemo.exe"
test3为创建的服务名,binPath后面是运行exe文件的所在路径

卸载:

1:停止服务
2:管理员打开CMD,输入命令:sc delete apache24 => apache24是服务名

服务设为开机自启:

sc config test3 start= AUTO

猜你喜欢

转载自www.cnblogs.com/wa502/p/11603749.html