Computing.Net > Forums > Windows XP > Services start with command line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Services start with command line

Reply to Message Icon

Name: blacklist02
Date: March 16, 2009 at 01:54:38 Pacific
OS: Windows XP
Subcategory: General
Comment:

how can i start services with command line




Response Number 1
Name: Chuck 2
Date: March 16, 2009 at 05:27:03 Pacific
+1
Reply:

If you want to open the window that list all the services, then type --- services.msc



Response Number 2
Name: justcallmegreg
Date: March 16, 2009 at 22:22:18 Pacific
+1
Reply:

You can use the commands net start <service name here> for some services or sc <service name here> start

Additionally, you can write a batch file that can start and stop services of your choice, for instance this batch file I wrote turns on/off windows update services through a menu. You're free to use this and manipulate anyway you choose to get an understanding of how it works. Just remember to name the file with a .bat or .cmd extension.

Good luck.

@echo off

:: Colors are 0=Black, 1=Blue, 2=Green, 3=Aqua, 4=Red, 5=Purple, ::6=Yellow, 7=White, 8=Gray, 9=Light Blue, A=Light Green, B=Light Aqua, C=Light Red, D=Light Purple, E=Light Yellow, F=Bright White

::Ex. To make a blue background with red text: Color 14

:MainMenu

Color 03

echo 1. Turn Windows Update On
echo 2. Turn Windows Update Off
echo 3. Exit
echo.

set /p choice=Please choose a number:
IF NOT '%choice%'=='' set choice=%choice:~0,1%
IF '%choice%'=='1' GOTO On
IF '%choice%'=='2' GOTO Off
IF '%choice%'=='3' GOTO Exit
echo "%choice%" is not valid please try again
cls
GOTO :MainMenu

:On

Color 09

sc config wuauserv start= auto
sc config BITS start= auto

sc start wuauserv
sc start BITS
cls
echo.Windows Updates are Enabled
cd C:\Program Files\Internet Explorer
start iexplore.exe "http://www.windowsupdate.com"
echo.
GOTO :MainMenu

:Off

Color 0C

sc stop wuauserv
sc stop BITS

sc config wuauserv start= disabled
sc config BITS start= disabled
cls
echo Windows Updates are Disabled
echo.
GOTO :MainMenu

:: This part is optional

:Exit

Color 0A

cls
echo All updated now!
echo Awesome! :)
echo.
pause
exit

Greg



Reply to Message Icon

Related Posts

See More


My computer stuck PC2NetBk usb cable?



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Google Ads



Results for: Services start with command line

running a DOS program with command line www.computing.net/answers/windows-xp/running-a-dos-program-with-command-line/12894.html

problem with terminal service www.computing.net/answers/windows-xp/problem-with-terminal-service/171894.html

List of Start->Run commands www.computing.net/answers/windows-xp/list-of-startrun-commands/90289.html