You received a message saying "SUCCESS" once the service has successfully been created. Sc Create Service will sometimes glitch and take you a long time to try different solutions. Furthermore, you can find the "Troubleshooting Login Issues" section which can answer your unresolved problems and equip you . For starting the service now the application is expecting a parameter called "-service" from the command line. The service must also be notified that it can take parameters. By double clicking in the "services" window we can see "Path to executable" (which is the . but the service does not start after creating this way. Parameter. Description . Servicename is the name of the Windows service to be created. 2."HKEY_LOCAL_MACHINE/SYSTEM . Note that this name is different from the display name. sc create pdfcreator start= auto binPath= "C:\Program Files\oldResourceKitTools\srvany.exe" DisplayName= "PDFCreator" obj= DOMAIN\User password= password. LoginAsk is here to help you access Sc Create Binpath With Arguments quickly and handle each specific case you encounter. error= {normal | severe | critical | ignore} . Furthermore, you can find the "Troubleshooting Login Issues" section which can answer your unresolved problems . Parameters. To create and register a new binary path for the NewService service, type: sc.exe \\myserver create NewService binpath= c:\windows . AWS RDS and DMS Tips and Best Practice: How to create Oracle database service and listener on Windows 2003 server. SC. I've also tried using nssm but can't find how to set start parameters there either. case 1) sc.exe create "Testapp" type= own start= auto binPath= "C:\myapp\Testapp.exe -conf C:\myapp\app.xml" It didn't work. The following examples show how you can use the sc create command: sc \\myserver create NewService binpath= c:\windows\system32\NewServ.exe sc create NewService binpath= c:\windows . I tried. Then just use net start <servicename>. Windows Services are managed through a tool called Service Controller, a.k.a. sc query redis. It gives the error: 1053 - the service did not respond to start or control in a timely manner. So I want to start a windows service with a start parameter (the little text field down the bottom of a windows service properties 'general' tab). Example, LoginAsk is here to help you access Sc Create Service quickly and handle each specific case you encounter. The specified service has been marked for deletion. Giving error as it not up in timely manner. I checked in the msdn, providing command line arguments in lpBinaryPathName should work. sc start redis. DisplayName= <DISPLAY_SERVICE_NAME>. This is the name given to the service key in the registry. To get the actual service name just type in net start without any parameters on the command prompt. I am using platform SDK . We'll use one simple command to create a windows service, and we'll start it manually through the services tab. Furthermore, you can find the "Troubleshooting Login Issues" section which can answer your unresolved problems and equip you with a lot of . Create Windows Service. How to Create a New Service with SC SC can be used to create a new service as well. create is the command to be run by SC (this command name is mandatory to create a service). I know it's possible to set the service to always start with a parameter via a registry entry or config file but that just isn't an option in this circumstance. Open your command prompt and hit below command. Share. I'm currently trying to use: sc CREATE test binPath= "\"C:\a.exe\" --run -c \"C:\a.config" If it contains spaces, you must put quotes around the service name. link. You can supply the parameters within the quotes: Parameters. Remember that you need admin privileges to create a service on Windows, so run an elevated command line to run these commands. . sc create MyService binPath= "c:\myservice\myservice.exe --port 8080" which will set the binary path to include your arguments. Sc Create Service Example will sometimes glitch and take you a long time to try different solutions. case 2) sc.exe create "Testapp" type= own start= auto binPath= " \"C:\myapp\Testapp.exe\" -conf C:\myapp\app.xml" service is created but service doesn't start. It should give you a list of all the running services so you can get the actual service name. Do not use this parameter if you are running SC on the local computer. 1.GUIservices. This is the name given to the service key in the registry. The name must start with two backslash (\) characters. To start a disabled service, change the start type to some other value. Service Control - Create, Start, Stop, Query or Delete any Windows SERVICE.The command options for SC are case sensitive.. Syntax SC [\\server] [command] [service_name] [Options] Key server: The machine where the service is running service_name: The KeyName of the service, this is often but not always the same as the DisplayName shown in Control Panel, Services. Parameter Description <servername> Specifies the name of the remote server on which the service is located. In order to consume these arguments, modify the Main method in your Windows Service project. create is the command to be run by SC (this command name is mandatory to create a service). To read the arguments, the Environment class can be used as shown in the following code snippet. With a double click on the exe it runs as windows application. I'm using sc.exe CREATE but can't find how to add start parameters to it. Now when you start your service, it will pass those arguments to the main function. sc delete redis. serviceName is the name of the Windows service to be created. The name must use the Universal Naming Convention (UNC) format (for example, \myserver). LoginAsk is here to help you access Sc Create Service Example quickly and handle each specific case you encounter. sc start redis. sc.exe create <SERVICE_NAME> binPath= <PATH_TO_EXECUTABLE>. Type "SC CREATE" to see the many settings that can be applied but at a minimum you must specify: the name of the service, the display name of the service (a more descriptive moniker), the full path to the executable hosting the service When creating the service using sc create, pay attention to leave a blank after the binPath option. With a Windows Service, it's possible to pass command-line arguments with the service configuration. How can I create a window service providing command line arguments? Everything has to be done using the command prompt. SC.exe. sc create <servicename> binpath= "<pathtobinaryexecutable>" [option1] [option2] [optionN] The trick is to leave a space after the = in your create statement, and also to use " " for anything containing special characters or spaces. Sc Create Binpath With Arguments will sometimes glitch and take you a long time to try different solutions.