What Does Background Service Mean On Pc Terms
If you're like most Windows users, you lot have lots of swell little utilities that run when you commencement Windows. While this works smashing for near apps, there are some that would be nice to start even before a user logs in to the PC. To do this, y'all'll need to run the app equally a Windows service.
Windows services are a special class of programs that are configured to launch and run in the groundwork, commonly without any sort of user interface and without needing a user to log in to the PC. Many gamers and power users know them as those things yous used to disable to help speed up your system, though that's actually not necessary any more than.
The primary reward of running an app every bit a service is that you can have a programme start before a user to log in. That can exist particularly of import with apps that provide important services you want to be available when you're away from your estimator.
RELATED: Understanding and Managing Windows Services
A perfect instance of this is Plex, a media server app that tin can stream local content to just about whatever device you lot ain. Sure, you could let it sit in the organization tray like a normal program, merely what if the figurer restarts due to a power outage or scheduled updates? Until y'all log back in on the PC, Plex wouldn't be available. That's irritating if you have to run to some other room to start Plex dorsum up while your popcorn gets cold, and super irritating if y'all're out of town and trying to stream your media over the Internet. Setting up Plex as a Service would solve that trouble.
Before getting started, y'all should be aware of a couple of important caveats to running an app as a service:
- The app will not put an icon in the system tray. If you need the interface available regularly for an app, it may not be best suited to run as a service.
- When you need to make configuration changes or updates, you lot'll need to end the service, run the program equally a regular app, do what you need to do, end the program, and and then commencement the service again.
- If the plan is already gear up to run when Windows starts, you'll need to disable that so that you don't terminate up with two instances running. Almost programs have an option in the interface for toggling this setting. Others may add themselves to your Startup binder, so you tin remove them there.
Ready to roll? Permit'south talk about how to ready information technology upward.
Step One: Install SrvStart
To run an app as a service, you're going to need a small, 3rd-party utility. There are several out in that location, but our favorite is SrvStart. It was originally designed for Windows NT, and will piece of work with just about whatsoever version of Windows from Windows XP on upward.
To get started, caput over to the SrvStart download folio and take hold of the utility. The download contains only four files (ii DLL and two EXE files). There's no installer; instead, copy these to your reckoner's C:\Windows folder these to your main Windows binder to "install" SrvStart.
We're besides going to presume that yous've already installed and gear up whatever program you're going to turn into a service, only if you haven't, now would be a good time to do that too.
Step Ii: Create a Configuration File for the New Service
Next, you'll want to create a configuration file that SrvStart will read to create the service. There'south a lot you can practice with SrvStart, and you can read the total details on all the configuration options on the documentation page. For this example, we are just going to use two commands: startup, which specifies the program to launch, and shutdown_method, which tells SrvStart how to close the plan when the respective service is stopped.
Burn down up Notepad and create your configuration file using the format below. Hither, we're using Plex, but you can create a file for any program you want to run as a service. The startup command simply specifies the path where the executable file resides. For the shutdown_method command, we're using the winmessage parameter, which causes SrvStart to transport a Windows close message to whatsoever windows opened by the service.
[Plex] startup="C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" shutdown_method=winmessage
Obviously, accommodate the path and proper name co-ordinate to the programme you're launching.
Save the new configuration file wherever you similar, and supervene upon the .txt extension with a .ini extension. Make notation of the file proper name, since we'll need it in the next step. For ease of typing at the Control Prompt, we suggest saving this file temporarily right on your C: bulldoze.
Step Three: Use the Command Prompt to Create the New Service
Your next step is using the Windows Service Controller (SC) command to create the new service based on the criteria in your configuration file. Open Control Prompt by correct-clicking the Start carte du jour (or pressing Windows+X), choosing "Command Prompt (Admin)", and then clicking Yes to allow it to run with administrative privileges.
At the Command Prompt, use the following syntax to create the new service:
SC CREATE <servicename> Displayname= "<servicename>" binpath= "srvstart.exe <servicename> -c <path to srvstart config file>" outset= <starttype>
There are a couple of things to annotation in that control. First, each equal sign (=) has a infinite after it. That's required. Besides, the <servicename> value is entirely up to y'all. And, finally, for the <starttype> value, you'll desire to utilize auto so that the service starts automatically with Windows.
And then in our Plex instance, the command would look like this:
SC CREATE Plex Displayname= "Plex" binpath= "srvstart.exe Plex -c C:PlexService.ini" start= automobile
Yes, you read that right: I used C:PlexService.ini instead of C:\PlexService.ini . The command requires yous to remove the slash.
When you run the control, yous should receive a SUCCESS bulletin if everything goes well.
From this point on, your new service will run whenever Windows starts. If you open the Windows Services interface (just click Start and type "Services"), you can find and configure the new service just like you would whatsoever other.
And that's all at that place is to it. If you lot have apps that start with Windows and yous'd rather they start without needing a user to log in, it's easy enough to turn whatever app into a service. We've only just touched on the basic method for creating and running a new service, but there's a lot more you lot can do with SrvStart to fine tune how a service runs. Be sure to check out the documentation if you'd like to learn more than.
What Does Background Service Mean On Pc Terms,
Source: https://www.howtogeek.com/50786/using-srvstart-to-run-any-application-as-a-windows-service/
Posted by: hickstung1962.blogspot.com

0 Response to "What Does Background Service Mean On Pc Terms"
Post a Comment