由于一些应用程序需要开机后自动启动,但往往放在开始-程序-启动菜单里,这个需要登陆电脑后才会启动,那么如何把程序添加到系统服务,不有登陆系统就自动运行程序呢?
在此只简单提及如何如何使用SC命令将程序加入系统服务功能:
加入服务格式如下:
sc create ServiceName binPath= 路径 start= auto(等号后面的空格必须)
删除服务格式如下:
sc delete ServiceName
我们举个例子,将FlashFXP加入到系统服务中。(FlashFXP安装在D:\Program Files\FlashFXP文件夹)。
sc create FlashFXP binPath= D:\Program Files\FlashFXP\FlashFXP.exe start= auto
我们要删除FlashFXP这个服务的话,只需要执行一下命令就可以了。
sc delete FlashFXP
sc create命令:
sc create [service name] [binPath= ] ...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type=
(default = own)
start=
(default = demand)
error=
(default = normal)
binPath=
group=
tag=
depend=
obj=
(default = LocalSystem)
DisplayName=
password=