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

Similar help and support threads
Thread Forum
Batch renaming files fails, error "the system cannot find file..."
Hi all, I'm trying to rename files with batch file "bulkrename.bat", that is generated by a short program made with Visual Foxpro 9.0. Here is the source code of Foxpro program: TV recordings renamed with XML metadata tag And here is generated "bulkrename.bat": ------------------- snip...
General Discussion
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...
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

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 12:49.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App