Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Batch file to disable services???

Posted on 2003-10-30
Medium Priority
Last Modified: 2007-12-19
i am trying to create a batch file to save me time. My goal is to run it on any windows xp computer, it will ask a few questions and then disable all services not needed. So far it is working ok.

Here is the problem.... I completed the batch file yestarday and when i run it everything runs fine.  I assumed it was good and done. so yestarday i ran it on a clients pc and it disabled their dsl, wierd huh??? i then ran it on another computer that didn't have dsl. now this computer can't get on the internet with juno, weird. anyways i ran system restore on both to a date before i screwed things up. it fixed everything fine. my problem is i don't know which service i am disabling that are causing these problems. i have gone to www.blackviper.com before but the site has been down for 2 days. if anybody has had these problems from disableing a service please let me know which service.
Question by:Paul S
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 41

Accepted Solution

stevenlewis earned 100 total points
ID: 9654782
LVL 22

Expert Comment

ID: 9655203
This is the file you have been screwing with.
LVL 11

Author Comment

by:Paul S
ID: 9655987
my batch file uses the command
sc config (service name) start= (auto/demand/disabled)
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 22

Expert Comment

ID: 9660704
gimme  the exact batch file here to view...
LVL 11

Author Comment

by:Paul S
ID: 9661363
i think i fixed my problem but i won't be able to test it for a while. but i will list batch file here. Feel free to copy the code and use it. i am trying to find a good website to upload it to. any ideas? i need to throughly test it first though. can you guys run it and see if it screws up your system? just make a restore point first or use the batch file to do it i unclude code for vb script needed for restore point

***batch file begin here******

@echo off
ECHO This program will attempt to speed up Windows XP Home or Pro
echo it will do so by disabling un needed services

set /p input=OK to run program (y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto starty
if "%input%"=="n" goto startn
echo invalid choice
goto start1

goto start

goto exit

echo a restore point will now be created please don't do anything
echo until a message pops up telling you it's done.
echo creating restore point.....
start /w restorept.vbs
echo if you answer any of the questions wrong
echo use the restore point that was just created
echo then run this program again.

rem disables system event notification service
sc config SENS stop>nul
sc config SENS start= disabled>nul

rem disables WMI Performance Adapter service

sc config WmiApSrv stop>nul
sc config WmiApSrv start= disabled>nul

rem disables volume shawdow copy service

sc config VSS stop>nul
sc config VSS start= disabled>nul

rem disables Web Client service

sc config WebClient stop>nul
sc config WebClient start= disabled>nul

rem disables upload manager service

sc config uploadmgr stop>nul
sc config uploadmgr start= disabled>nul

rem disables UPNPhost service

sc config UPNPhost stop>nul
sc config UPNPhost start= disabled>nul

rem disables terminal services service

sc config TermService stop>nul
sc config TermService start= disabled>nul

rem disables telnet service

sc config TlntSvr stop>nul
sc config TlntSvr start= disabled>nul

rem disables ssdp discovery service

sc config SSDPSRV stop>nul
sc config SSDPSRV start= disabled>nul

rem disables secondary logon service

sc config seclogon stop>nul
sc config seclogon start= disabled>nul

rem disables routing and Remote Access service

sc config RemoteAccess stop>nul
sc config RemoteAccess start= disabled>nul

rem disables remote registry service

sc config RemoteRegistry stop>nul
sc config RemoteRegistry start= disabled>nul

rem disables remote access help service

sc config RDSessMgr stop>nul
sc config RDSessMgr start= disabled>nul

rem disables Network Qos Service (slows network performance)

sc config RSVP stop>nul
sc config RSVP start= disabled>nul

rem disables portable mp3 device serial number Service

sc config WmdmPmSp stop>nul
sc config WmdmPmSp start= disabled>nul

rem disables system performance logs Service

sc config SysmonLog stop>nul
sc config SysmonLog start= disabled>nul

rem disables NetDDE dsdm Service

sc config NetDDEdsdm stop>nul
sc config NetDDEdsdm start= disabled>nul

rem disables NetDDE Service

sc config NetDDE stop>nul
sc config NetDDE start= disabled>nul

rem disables net meeting remote desktop Service

sc config mnmsrvc stop>nul
sc config mnmsrvc start= disabled>nul

rem disables indexing Service

sc config cisvc stop>nul
sc config cisvc start= disabled>nul

rem disables windows help Service

sc config helpsvc stop>nul
sc config helpsvc start= disabled>nul

rem disables FastUserSwitching Compatibility Service

sc config FastUserSwitchingCompatibility stop>nul
sc config FastUserSwitchingCompatibility start= disabled>nul

rem disables error reporting Service

sc config ERSvc stop>nul
sc config ERSvc start= disabled>nul

rem disables link tracking Service

sc config TrkWks stop>nul
sc config TrkWks start= disabled>nul

rem disables computer browser Service

sc config Browser stop>nul
sc config Browser start= disabled>nul

rem disables clipbook Service

sc config ClipSrv stop>nul
sc config ClipSrv start= disabled>nul

rem disables Background Intelligent Transfer Service

sc config bits stop>nul
sc config bits start= disabled>nul

rem disables messenger service   ***security hole*****

sc config Messenger stop>nul
sc config Messenger start= disabled>nul

rem disables alerter service

sc config Alerter stop>nul
sc config Alerter start= disable>nul

rem wireless network card service

set /p input=Do you have a wireless network card (y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto wirey
if "%input%"=="n" goto wiren
echo invalid choice
goto wire1

goto wirex

sc config WZCSVC stop>nul
sc config WZCSVC start= disabled>nul


rem power backup service

set /p input=Do you have a battery backup for this pc (y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto upsy
if "%input%"=="n" goto upsn
echo invalid choice
goto ups1

goto upsx

sc config ups stop>nul
sc config ups start= demand>nul


Rem ICS and ICF service

set /p input=Do you use windows' built in firewall or internet connection sharing (y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto SharedAccessy
if "%input%"=="n" goto SharedAccessn
echo invalid choice
goto SharedAccess1

goto SharedAccessx

sc config SharedAccess stop>nul
sc config SharedAccess start= disable>nul
sc config Nla stop>nul
sc config Nla start= disabled>nul


Rem update service

set /p input=Do you want your PC kept up-to-date automaticaly(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto wuauservy
if "%input%"=="n" goto wuauservn
echo invalid choice
goto wuauserv1

goto wuauservx

sc config wuauserv stop>nul
sc config wuauserv start= disable>nul


rem server service

set /p input=Aure you part of a network that shares files or printers(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto lanmanservery
if "%input%"=="n" goto lanmanservern
echo invalid choice
goto lanmanserver1

sc config lanmanserver start= auto>nul
goto lanmanserverx

sc config lanmanserver stop>nul
sc config lanmanserver start= disable>nul


rem smart card service

set /p input=Is this PC a laptop(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto SCardSvry
if "%input%"=="n" goto SCardSvrn
echo invalid choice
goto SCardSvr1

goto SCardSvrx

sc config SCardSvr stop>nul
sc config SCardSvr start= disable>nul
sc config SCarddrv stop>nul
sc config SCarddrv start= disable>nul


rem netbios service

set /p input=Do you use netbios over tcp/ip(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto LmHostsy
if "%input%"=="n" goto LmHostsn
echo invalid choice
goto LmHosts1

goto LmHostsx

sc config LmHosts stop>nul
sc config LmHosts start= disable>nul


rem themes service

set /p input=Does this pc use visual themes(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto Themesy
if "%input%"=="n" goto Themesn
echo invalid choice
goto Themes1

goto Themesx

sc config Themes stop>nul
sc config Themes start= disable>nul


rem windows image acquasition service

set /p input=does this pc use a digital camera, web cam, or scanner(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto stisvcy
if "%input%"=="n" goto stisvcn
echo invalid choice
goto stisvc1

goto stisvcx

sc config stisvc stop>nul
sc config stisvc start= disable>nul


rem windows time service

set /p input=Do you want your pc to get the right time off the net(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto W32Timey
if "%input%"=="n" goto W32Timen
echo invalid choice
goto W32Time1

goto W32Timex

sc config W32Time stop>nul
sc config W32Time start= disable>nul


rem remote access connection manager and remote access auto connection manager services

set /p input=Are you part of a network or use the internet on this pc(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto RasMany
if "%input%"=="n" goto RasMann
echo invalid choice
goto RasMan1

set /p input=Are you part of a network that uses a domain or vpn(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto netlogony
if "%input%"=="n" goto netlogonn
echo invalid choice
goto RasMany

sc config Netlogon stop>nul
sc config Netlogon start= disabled>nul
sc config PolicyAgent stop>nul
sc config PolicyAgent start= disabled>nul

goto RasManx

sc config RasMan stop>nul
sc config RasMan start= disabled>nul
sc config RasAuto stop>nul
sc config RasAuto start= disabled>nul
sc config Netman stop>nul
sc config Netman start= disabled>nul


rem print spooler service

set /p input=Does this pc have a printer(y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto Spoolery
if "%input%"=="n" goto Spoolern
echo invalid choice
goto Spooler1

goto Spoolerx

sc config Spooler stop>nul
sc config Spooler start= demand>nul


rem logical disk managment service

set /p input=Do you use the Disk Management MMC console (y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto dmservery
if "%input%"=="n" goto dmservern
echo invalid choice
goto dmserver1

goto dmserverx

sc config dmserver stop>nul
sc config dmserver start= demand>nul


rem ImapiService service (windows xp bulit in burning app)

set /p input=Do you use the built in windows xp burning system (y/n) ?
set userinp=%userinp:~0,1%
if "%input%"=="y" goto ImapiServicey
if "%input%"=="n" goto ImapiServicen
echo invalid choice
goto ImapiService1

goto ImapiServicex

sc config ImapiService stop>nul
sc config ImapiService start= disabled>nul


echo .
echo .
echo System is now optimized

echo .
echo .
echo *****************************
echo disable fast user switching.
echo *****************************


****batch file end here****

***vb script start here*****

'Unattended System Restore Point
'© Doug Knox - rev 02/06/2002
'This code may be freely distributed/modified
'Downloaded from www.dougknox.com
'Extracted from original code by Bill James - www.billsway.com

Set sr = getobject("winmgmts:\\.\root\default:Systemrestore")

msg = "New Restore Point successfully created." & vbCR
msg = msg & "It is listed as: " & vbCR
msg = msg & "Automatic Restore Point " & Date & " " & Time

If (sr.createrestorepoint("Automatic Restore Point", 0, 100)) = 0 Then
    MsgBox msg
    MsgBox "Restore Point creation Failed!"
End If

Set sr = Nothing

****vb script end******
LVL 22

Expert Comment

ID: 9661553
wow !
LVL 11

Author Comment

by:Paul S
ID: 9661815
yeah it's pretty long, but it is very simple. i copyed ask a question code because the commands have changed since win98.
LVL 11

Author Comment

by:Paul S
ID: 9784512
i think i fixed it thanks guys.

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of:,,, …
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question