by

Register Windows Service Command Line

Register Windows Service Command Line Average ratng: 3,8/5 9830 reviews
Active1 year, 4 months ago

Register as a Windows Service. To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator, then run the following command: sc create gitea start= auto binPath= 'C: gitea gitea.exe' web -config 'C: gitea custom conf app.ini' Do not forget to replace C: gitea with the correct Gitea directory. Dec 02, 2013  How to re-register time services on a server This time, I would like to show you, how you can simply fix an issue with time services on your server. Final step requires to start Windows Time service in command prompt. The procedure required for Windows Time service re-registration is EXACTLY the same as for Windows Server 2003.

Register as a Windows Service. To register Gitea as a Windows service, open a command prompt (cmd) as an Administrator, then run the following command: sc create gitea start= auto binPath= 'C:giteagitea.exe' web -config 'C:giteacustomconfapp.ini' Do not forget to replace C:gitea with the correct Gitea directory.

Is there a way to restart a Windows service from the command prompt?

Learn how to download presentations in pdf format.Don't forget to check out our site for more free how-to videos!- our feed- join us on Facebook- our group in Google+In this tutorial, we will teach you how to download from SlideShare. Download slideshare pdf From Slideshare, you can download presentations on topics that interest you.Step 1 - Go to slideshare.netFirst of all, open any web browser and go to slideshare.net.For the purpose of this tutorial, we have already logged into slideshare. You can always click on any one of them in order to open the presentation.Step 2 - Save the presentationAs a result, a new page will open containing the presentation that you selected. The home page will open up where you will be able to view different featured presentations.

Peter Mortensen
8,58316 gold badges62 silver badges85 bronze badges
JoeJoe

7 Answers

You can use net stop [service name] to stop it and net start [service name] to start it up again basically restarting the service.

To combine them just do this - net stop [service name] && net start [service name].

There is also a command built specifically for messing with services: sc

Scott Chamberlain
28.4k6 gold badges84 silver badges102 bronze badges
paradd0x

Register Windows Service Command Line Linux

paradd0x
7,2415 gold badges27 silver badges43 bronze badges

Please, note that if there are other services that depends on this service - usual net stop & net start will not restart them. net stop /y will stop all dependencies

Most common example - SQL Server & SQL Agent.

I do recommend PowerShell cmdlet to solve this:

powershell -command 'Restart-Service MSSQLSERVER -Force'

After MSSQLSERVER starts - cmdlet starts all previously stopped dependancies.

PS: Make sure you are running command as admin

Dmitry GusarovDmitry Gusarov
Gaff
16.5k11 gold badges51 silver badges66 bronze badges
devlifedevlife

To restart a Windows service from the command prompt or scheduled tasks, use this:

Peter Mortensen
8,58316 gold badges62 silver badges85 bronze badges
KikiKiki

To solve the annoying Wacom Intuous Driver not running Error I get on every reboot.

Windows key + R, paste, Bam!

Simon East
1,9563 gold badges24 silver badges27 bronze badges
GeorgeGeorge

The PsService utility from PsTools provides a restart command for services, with additional parameters to run it on another machine.

The -accepteula flag saves you the EULA window just in case it's the first time you use this utility with the current user.

cdlvcdlvcdlvcdlv

In case you know the service's executable location path you could use

On the command line.

That will actually help you debug the issue if the service should fail to start.

sup4elisup4eli

protected by CommunityApr 7 '17 at 10:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged windows-7windowscommand-line or ask your own question.

Active2 years, 11 months ago

Install A Windows Service Manually

On my Sony Viao pcg-811124 laptop with Windows 7, I disabled all non-Windows services through msconfig. When I restarted my laptop, it booted up, but I cannot view the screen, even in safe mode. I may have disabled a driver, but now I have no way of knowing which one.

So, not only do I not know which services I disable and need to enable, I can't seem to even enable the services I know that I have (for example, JungleDisk). When tried to restart it via the command line, I got prompted that I could not restart this service because it had been disabled.

How do I get my services enabled again?

random
13.2k8 gold badges50 silver badges57 bronze badges
frostyfrosty

migrated from serverfault.comAug 12 '10 at 10:56

This question came from our site for system and network administrators.

2 Answers

I believe the command you are looking for is:

sc config servicenamehere start= auto

You'll need to know the name of the service though - to view this from the command line, try this command - this will show all services:

sc query type= service state= all

If you want to see only stopped services, run this command:

sc query type= service state= inactive

The list of services output by the query can be quite long. You may filter it by using findstr (see post here) . For example

sc query type= service state= all findstr 'ssh'

Will select the output lines of the services list that contain the string 'ssh'

Note: For some services you may need also administrator privileges, you will notice it on getting the message Access is denied after executing the sc command. In that case open the Command Prompt (Admin) by pressing 'Windows + X' keys.

Community
emtuncemtunc

You can use PowerShell! (To start it, type powershell at a normal command prompt.)

The Get-Service cmdlet gets a list of services, which you can filter by any property. For example, this gets a list of disabled services:

The Set-Service cmdlet can set several properties of a given service, including the startup type. For example, this sets the lanmanserver service to start automatically:

To make all currently disabled services start automatically, use this command:

Ben NBen N

Register Windows Service Command Line Number

31.5k13 gold badges108 silver badges153 bronze badges

Register A Windows Service Command Line

Not the answer you're looking for? Browse other questions tagged windows-7command-lineservices or ask your own question.