Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Batch file to stop services fails

15 Feb 2010   #1

windows 7 home premium
Batch file to stop services fails

Back in the good ol days of xp when I wanted to take my machine off the net and use it for music production I had a seperate hardware profile setup with lots of services (including all the networking ones) disabled. With vista I discovered microsoft had taken this ablity away. So I wrote a batch file which when run as administrator would more or less do the same thing (lots of net stop commands). Now in windows 7 I've written a new one but whenever I run it (as admin of course) a cmd window flashes up for a second & then nothing... all the services are still running. What do I do?

My System SpecsSystem Spec
19 Mar 2010   #2

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)

Click the ORB, then All Programs, Accessories, Right Mouse Click on “Command Prompt” and then “Run As Administrator”. Then you can run your script.

You need to do something like:

net stop <service name>
net stop <service name>
net stop <service name>
net stop <service name>

Simple Script to Stop Services:

@echo off
net stop spooler
That script will stop the Print Spooler service.

I hope that helps.
My System SpecsSystem Spec
20 Jul 2012   #3

Windows 7, 64 bit (on my 'main' computer)

I'm trying to make an autoexe.bat file that will stop 2 specific Western Digital service sthat hog RAM.

I am testing out on my machine with the spooler service so that I know it works before I rill it out.

I have;

net stop spooler

which , when run in a cmd prompt as administrator says that the service has successfully stopped, however when I go to verify by openeing services.msc it still says it's running. The cmd prompt and the GUI state 2 different things!
My System SpecsSystem Spec


 Batch file to stop services fails

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar help and support threads
Thread Forum
Can I set up a button to stop a batch file from running?
I have my machine set to hibernate at 2 AM in case I forget to turn it off. But sometimes I'll be up working or watching TV so I set up a batch file with a 60 second delay to abort it. Sometimes I'm in bed with a wireless mouse (no x rated pun intended) and no keyboard so I'll have to get up and...
Performance & Maintenance
Batch File on USB fails when Ran As Administrator
I am new to this site so please excuse any lack of etiquette I may show. I have recently built a .bat files to perform a large number of configuration changes needed for a Win7 or Win8 workstation to function properly on my network. The .bat file obviously needs to be ran with elevated...
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
Edit Services with Batch File
Is there a way to make a batch file that will automatically change Services? My main goal here is to 1 click edit all the services I change from disable,automatic, and delayed. I use the same settings for the entire family that I am tech support for so it makes life easier. Anything I can do...
Performance & Maintenance
Which of these services can I stop?
They take up a huge amount of memory.
Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 08:11.

Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App