gpt4 book ai didi

windows - 使用 SC 安装 Windows 服务

转载 作者:可可西里 更新时间:2023-11-01 10:54:42 25 4
gpt4 key购买 nike

我正在使用 installutils 命令安装一些服务,但我在使用 SC create 命令安装这些服务时遇到了巨大的麻烦。两种模式有什么区别。我没有从命令中得到任何错误,但是有一系列选项。这是我使用的格式:

SC create ZAM displayname= "ZAM" binpath="E:\ZAM\ZAM.exe" start=auto 

我得到以下信息:

DESCRIPTION:
Creates a service entry in the registry and Service Database.
USAGE:
sc <server> create [service name] [binPath= ] <option1> <option2>...

OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>

我不明白哪里出了问题?

最佳答案

我建议使用 New-Service 而不是直接调用“sc” .参数是直接翻译。它在默认的 powershell 模块中可用。

关于windows - 使用 SC 安装 Windows 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19595145/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com