惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
Help Net Security
Help Net Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Latest news
Latest news
PCI Perspectives
PCI Perspectives
W
WeLiveSecurity
Spread Privacy
Spread Privacy
O
OpenAI News
T
Threat Research - Cisco Blogs
S
Secure Thoughts
Cyberwarzone
Cyberwarzone
S
Security Affairs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
V2EX - 技术
V2EX - 技术
V
Vulnerabilities – Threatpost
A
Arctic Wolf
P
Proofpoint News Feed
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
N
News | PayPal Newsroom
C
Cisco Blogs
T
Troy Hunt's Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Security @ Cisco Blogs
G
GRAHAM CLULEY
Security Latest
Security Latest
K
Kaspersky official blog
Forbes - Security
Forbes - Security
AI
AI
Hacker News - Newest:
Hacker News - Newest: "LLM"
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AWS News Blog
AWS News Blog
H
Help Net Security
N
News and Events Feed by Topic
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
量子位
Last Week in AI
Last Week in AI
小众软件
小众软件
V
V2EX

博客园 - 人生为卒

CAD缺失字体如何处理 Excel 快速拖动公式的方法 微信小程序隐私审核 微信小程序创建流程 mysql 查询数据库的所有表格字段 CAD二次开发入门:WPF类库 Excel 根据单元格值设置行颜色 log4.config MySq 表内存占用情况 C# 检测并重启windows服务,IIS应用池 redis 服务安装 Windows系统下本地MQTT服务器搭建,及开机自启 Navicat设置备份文件存储路径 Windows自动录屏功能 spring中常用注解 Windows系统 nacos 部署 解决不能访问GitHub的问题 Java 打包到部署子工程出错 Java-Maven基础
cmd安装Windows服务
人生为卒 · 2024-08-06 · via 博客园 - 人生为卒

Server.Name 服务名称
binPath 服务程序执行路径
displayname 服务显示的名称
start 服务启动类型
Server.Description 服务显示描述

      
-- 这是一个注释
# 这也是一个注释
/*
这是一个多行注释的
示例,‌可以跨越多行进行注释。‌
*/

/*
如何定义变量并且引用:你可以使用set命令来定义变量并赋予它一个变量,你可以通过%变量名%来引用变量。‌
示例,‌
set myVariable=Hello World
echo %myVariable%
*/


# 注意:以下内容有汉字会乱码,暂时未调查如何解决

# 以下变量依次为:服务程序路径;服务名称,服务显示名称,服务描述
set ExePath=D:\WebSite\MyExe.exe
set ServerName=Server.Name
set ServerDisplayname=Server.DisplayName
set ServerDescription=Server.Description

sc create %ServerName% binPath= %ExePath% displayname= %ServerDisplayname% start= "auto"
sc description %ServerName% %ServerDescription%