Batch file to disable services???

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 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.
LVL 11
Paul SDesktop Support Manager / Network AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This is the file you have been screwing with.
Paul SDesktop Support Manager / Network AdministratorAuthor Commented:
my batch file uses the command
sc config (service name) start= (auto/demand/disabled)
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

gimme  the exact batch file here to view...
Paul SDesktop Support Manager / Network AdministratorAuthor Commented:
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
'Extracted from original code by Bill James -

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******
wow !
Paul SDesktop Support Manager / Network AdministratorAuthor Commented:
yeah it's pretty long, but it is very simple. i copyed ask a question code because the commands have changed since win98.
Paul SDesktop Support Manager / Network AdministratorAuthor Commented:
i think i fixed it thanks guys.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.