Jump to content

how can i stop/start service via dos commands?


ceez

Recommended Posts

zup fellow msfn-ers....?

I would like to stop and start service via dos. I type 'net help services' and it lists some services that I can start by using net start <servicename>. But the service I am trying to restart is a blackberry service. How can I list all the services so I know the correct name? Then I assume I would use net stop <servicename> and then net start <servicename>.

thanks for the help

ceez

:thumbup

Link to comment
Share on other sites


It's easier is you use the "sc" command at any DOS prompt. 'sc' by itself will list all running services, then:

sc stop <service> will stop service, or sc start <service>.

I use it all the time.

Link to comment
Share on other sites

I used this batch file to clear my printer of any jobs in que

Modifiy it to suit your needs.

@Echo Off && CLS && Mode 75,5 && Color f3 && Title Clear Printer Queue
Echo. && net stop spooler
ping -n 3 127.0.0.1>nul && CLS
del %systemroot%\system32\spool\printers\*.* /F /Q /S
ping -n 3 127.0.0.1>nul && CLS
Echo. && net start spooler

Link to comment
Share on other sites

True, Windows 2k and XP kernel doesn't have any MS-DOS components in it at all—it's a pure 32-bit beast. However it includes a 16-bit emulator and a command prompt mode that looks like MS-DOS but with limted DOS commands that fuction simlular and somewhat different as real DOS.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...