删除服务
删除名为“WINDOWS MANAGEMONT INSTALLER”的系统服务
sc delete "windows managemont Installer"
创建服务
创建名为Windows Managemont Installer 的服务
启动路劲为 “cmd.exe /c start c:\a.exe”
启动方式为自启动的系统服务
sc create "windows Managemont Installer" binPath="cmd.exe /c start c:\a.exe " start = auto
实例
C:\Users\lenovo> sc create MyService binPath="C:\Program Files\restartOracle.bat"
type=share start=auto displayname "AutoStartOralce Services"
[SC] createService成功
C:\Users\lenovo> services.msc