Sc create Command in Windows Server 2008

In this article I am going to explain about sc create command in windows server 2008 operating system.
  • 5023


The operating system sc create command is used to create a SubKey and entries for a service in the registry and in the Service Control Manager database.

Syntax of Sc create

sc [<ServerName>] create [<ServiceName>] [type= {own | share | kernel | filesys | rec | interact type= {own | share}}] [start= {boot | system | auto | demand | disabled}] [error= {normal | severe | critical | ignore}] [binpath= <BinaryPathName>] [group= <LoadOrderGroup>] [tag= {yes | no}] [depend= <dependencies>] [obj= {<AccountName> | <ObjectName>}] [displayname= <DisplayName>] [password= <Password>]

Parameters in Sc create command

It contains following parameter, which is given below:
Parameter Description
<ServerName> It specifies the name of the remote server on which the service is installed.
<ServiceName> It specifies the service name.
type= {own | share | kernel | filesys | rec | interact type= {own | share}} It specifies the service type.
start= {boot | system | auto | demand | disabled} It specifies the start type for the service.
error= {normal | severe | critical | ignore} It specifies the severity of the error if the service fails when the computer is started.
binpath= <BinaryPathName> It specifies a path of the service binary file.
group= <LoadOrderGroup> It specifies the name of the group of which this service is a member
tag= {yes | no} It specifies whether or not to obtain a TagID from the CreateService call.
depend= <dependencies> It specifies the names of services or groups that must start before this service.
obj= {<AccountName> | <ObjectName>} It specifies a name of an account in which a service will run, or specifies a name of the Windows driver object in which the driver will run.
displayname= <DisplayName> It specifies a descriptive name for identifying the service in user interface programs.
password= <Password> It specifies the password.

Example of Sc create command

sc create NewService binpath= c:\abc.exe type= share start= auto depend= "+TDI Netbios"




More Articles

© 2020 DotNetHeaven. All rights reserved.