Wednesday, June 12, 2024
HomeWindowsBatch file programmingCreate Batch File to Start or End Window Services

Create Batch File to Start or End Window Services

The windows environment can be easily changed by starting or ending various windows services. For example, this method can be used to easily shut down multiple services for a performance boost during game playing.

Update: This article was original crafted for XP; however, I continue to use this technique on my Windows 7 and Windows 8 systems. On more recent Windows systems, the batch file will need to be run as administrator.

Warning: Manipulating windows services can have unpredictable effects on your system. You should create a system restore point before experimenting.

We all want to tweak or windows systems to the extreme to get the quickest, most powerful system possible. Many people will disable multiple window services manually before game playing. What a pain!

Many times people forget what the services do or forget to restart the important ones. Services can be easily changed by creating batch files.

The important commands are the following:
NET START – starts the service
NET STOP – ends the service

For example:
NET STOP "Error Reporting Service"

Output: The Error Reporting Service service was stopped successfully.

Knowing the commands, one can now easily create batch files called something like beforegame.bat and aftergame.bat.

Before.bat would contain all the NET STOP commands to end the nonessential services.
After.bat would be exactly the same except all the NET STOP commands would be replaced with NET START commands to restart all the common services.

A sample of the before.bat file might look something like this:

NET STOP "Error Reporting Service"
NET STOP "FTP Publishing Service"
NET STOP "Messenger"

Likewise, the after.bat file might look something like this:

NET START "Error Reporting Service"
NET START "FTP Publishing Service"
NET START "Messenger"

You may wish to reference this: list of services that can be disabled.

If your system ever becomes unstable and you want to return the services to their default settings, the default settings for the windows services can be found here.

David Kirk
David Kirk
David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.


Please enter your comment!
Please enter your name here

Most Popular


Recent Comments

error: Content is protected !!