none
how to start and stop services on windows 7 - extending laptop life

    Question

  • hi folks,

     

    i have a laptop that i use for developement - it has windows 7 ult.

    i would like to find out a way - probably via command-line to start and stop certain servives when i need them.

    the idea is to conserve battery as much as possible by keeping the most services always off.

    i have red about runas but i am not certain that there is no other option available.

     

    many thanks,

     

    Nicolas


    data warehouse | data migration | ETL/ELT | UK | http://www.brainpowered.net
    Friday, May 21, 2010 6:06 AM

Answers

  • Well, you need to use runas or an administrator prompt because standard users don't have permission to stop services, this includes Admin accounts run with UAC enabled.

    But the fastest way I know of to get to and start or stop a service is using the net command line program. If you open up an Administrator console and then try the following

    net stop "DNS Client"

    followed by

    net start "DNS Client"

    You should see that it stops then starts. To get the names of the services on your system go to Control Panel->Administrative Tools->Services. Then you can use the names in here to start or stop that service.


    Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
    Visit my (not very good) blog at
    http://c2kblog.blogspot.com/
    • Marked as answer by Nicolas D Friday, July 30, 2010 11:15 AM
    Friday, May 21, 2010 11:03 AM

All replies

  • Well, you need to use runas or an administrator prompt because standard users don't have permission to stop services, this includes Admin accounts run with UAC enabled.

    But the fastest way I know of to get to and start or stop a service is using the net command line program. If you open up an Administrator console and then try the following

    net stop "DNS Client"

    followed by

    net start "DNS Client"

    You should see that it stops then starts. To get the names of the services on your system go to Control Panel->Administrative Tools->Services. Then you can use the names in here to start or stop that service.


    Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
    Visit my (not very good) blog at
    http://c2kblog.blogspot.com/
    • Marked as answer by Nicolas D Friday, July 30, 2010 11:15 AM
    Friday, May 21, 2010 11:03 AM
  • thanks for your suggestion.

     

     


    data warehouse | data migration | ETL/ELT | UK | http://www.brainpowered.net
    Friday, July 30, 2010 11:15 AM