Hi,
Is it possible to start/stop windows services?
Regards.
Start/Stop windows services?
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Start/Stop windows services?
With EG anything is possible!!!
But to answer your question, Yes you can start and stop services.
To get the exact service name of the service you want to start and stop you can run this command from a command prompt
create a macro and in that macro add in the System - > Run Command action. in the command line field enter one of the commands below you will replace SERVICE_NAME with the name you got from the query. make sure "Disable parsing of string" is checked off. Depending on on long it takes for the service to start or terminate and also what you are doing that may rely on the service you may or may not want to check off the "Wait until command is terminated before proceeding" If the service takes longer then 3 seconds to either start or stop I would recommend unchecking the wait and checking off the Trigger event. if there are additional actions that you would need to run after the service starts you can do that off of the event that gets triggered from this action.
The user account that you are logged in with is going to have to have the permissions needed to start and stop services. Or you will have to run EventGhost as the Administrator.
But to answer your question, Yes you can start and stop services.
To get the exact service name of the service you want to start and stop you can run this command from a command prompt
Code: Select all
sc query
Code: Select all
sc start SERVICE_NAME
Code: Select all
sc stop SERVICE_NAME
Re: Start/Stop windows services?
It is quite easy to start or stop windows services. A service is an application type that runs in the system background without any user interface, and without needing a user to log in to the PC. Here is a very simple way of starting, stopping or disabling actions for services on local and remote computers.
1. Open the Services snap-in window.
2.Then you Start, Stop, or Disable any service you want to change its action. To start a service, right-click on it, and then click Start.
3.You can manage a program Startup type by double-clicking on it.
1. Open the Services snap-in window.
2.Then you Start, Stop, or Disable any service you want to change its action. To start a service, right-click on it, and then click Start.
3.You can manage a program Startup type by double-clicking on it.
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Start/Stop windows services?
@Roosje
I believe the person was asking because they wanted to do it programmatically
I believe the person was asking because they wanted to do it programmatically