Announcement

Collapse
No announcement yet.

How do I disable services from command line?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I disable services from command line?

    My plan:

    Make a .bat that I can run whenever I format that will automatically disable all the services I have picked I don't want to start without having to do it manually with services.msc

    My question:

    How do I make something like this. Is there a command line like net disable "Security Center" where I could enter all the services to disable in the .bat and it would be done with one click?

    This would be really handy if anybody knows :)
    Like the server? Become a regular! TGNS Required Reading
    Answers to every server question? Yes! TGNS FAQ

  • #2
    Re: How do I disable services from command line?

    You can do this by using the net stop "service name" command to restart you replace stop with start. It should work with all services, but most likely you will have to be an admin to start and stop them. It does work, just tried it out. Remember if there are spaces in the name of the service to put the service inside of quotes.

    Also to get a list of services currently running type in net start and that will give you a list of running services.

    If you want to do the same with processes. Use the command tasklist to get a list of running processes and PID's, the use the command taskkill /PID "PID Number".
    -BB|KillerTarget

    Comment


    • #3
      Re: How do I disable services from command line?

      C:\> shutdown -f -t 0

      Stops spam, too.
      Steam Community? Add me. | Free Remote, Encrypted Backup

      Darkilla: In short, NS is pretty much really fast chess. With guns. Apophis: I haven't seen anyone say that SM's are better than non-SMs. Nordbomber: This is THE first server I've seen where either side can comeback from out of seemingly nowhere with the right teamwork. en4rcment: I have NEVER experienced the type of gameplay that I have found here. Nightly I am amazed at the personalities and gaming talent. Zephyr: Apophis is clearly a highly sophisticated self-aware AI construct that runs on a highly modified toaster oven in Wyzcrak's basement.

      Comment


      • #4
        Re: How do I disable services from command line?

        Originally posted by Wyzcrak
        C:\> shutdown -f -t 0

        Stops spam, too.

        That works also, sorta like getting n00bs out of servers by telling them that to activate cheats you just hit alt-f4.
        -BB|KillerTarget

        Comment


        • #5
          Re: How do I disable services from command line?

          Originally posted by KillerTarget
          You can do this by using the net stop "service name" command to restart you replace stop with start. It should work with all services, but most likely you will have to be an admin to start and stop them. It does work, just tried it out. Remember if there are spaces in the name of the service to put the service inside of quotes.

          Also to get a list of services currently running type in net start and that will give you a list of running services.

          If you want to do the same with processes. Use the command tasklist to get a list of running processes and PID's, the use the command taskkill /PID "PID Number".
          I know how to do that, what I was wondering is if you can disable services permentally in the same fashion, or with a command line. I know that net disable doesn't exist, I was just using it as an example for what I was looking for. Is there some other way I can disable multiple services automatically without having to manually do it with services.msc, and not using an external program.

          Originally posted by Wyzcrak
          C:\> shutdown -f -t 0

          Stops spam, too.
          Har
          Like the server? Become a regular! TGNS Required Reading
          Answers to every server question? Yes! TGNS FAQ

          Comment


          • #6
            Re: How do I disable services from command line?

            using the bat file you just input the services you want to stop using the same context, then you can make another bat file that does the same thing, excpet it starts those processes back up again. As for permantly killing them I do not know.
            -BB|KillerTarget

            Comment


            • #7
              Re: How do I disable services from command line?

              Originally posted by KillerTarget
              using the bat file you just input the services you want to stop using the same context, then you can make another bat file that does the same thing, excpet it starts those processes back up again. As for permantly killing them I do not know.
              The only thing I'm worried about is if I have to do it like that, it wll take a long time to stop all of them every time I start the computer. I guess another reason why I'm doing this is when I'm optimizing other computers for people I can permentally disable uneeded services.
              Like the server? Become a regular! TGNS Required Reading
              Answers to every server question? Yes! TGNS FAQ

              Comment


              • #8
                Re: How do I disable services from command line?

                Forget it, I'll ask a tech forum
                Like the server? Become a regular! TGNS Required Reading
                Answers to every server question? Yes! TGNS FAQ

                Comment


                • #9
                  Re: How do I disable services from command line?

                  LOL good decision.

                  People, this is a classic example of "If you don't have something good to say, don't say anything at all."

                  BTW, aeroripper, there used to be an XP patcher disk which took care of all of these things for you when you did a fresh install. It included all of the patches and piles of commonly used tweaks. I'm not sure if it still exists, but I'll link it if I find it.
                  Peace through fear... since 1947!

                  Comment


                  • #10
                    Re: How do I disable services from command line?

                    Reply to self.

                    Check out autopatcher.com

                    If you can handle working through the technical details, it is a wonderful thing.
                    Peace through fear... since 1947!

                    Comment


                    • #11
                      Re: How do I disable services from command line?

                      Can you import a registry file using regedit32 from a batch file?

                      http://www.msfn.org/board/lofiversio...hp/t38247.html

                      Tech forum.. pshshshs ;)
                      Battlefield Admin() ()
                      [volun2][medic][defense3][eng2][support]
                      [sg-c1][gchq-c1][tog-c1][ma-c1][taw-c1][tg-c2]
                      | for | |

                      Comment


                      • #12
                        Re: How do I disable services from command line?

                        i know if you have admin privs you can make edits to the registry through a batch file or even a cmd file. Using the command of reg import "location of reg file", the locations of the services in windows XP pro is located under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es. What you can do is on a system disable the services that you want disabled and export them to a reg file, and then on the systems that you want run regedit itself and import the reg files or make a bat or cmd file that asks you what keys you want to import onto that system.
                        -BB|KillerTarget

                        Comment


                        • #13
                          Re: How do I disable services from command line?

                          Thank you killer, icky, and perry. I will definitely have to look into this I think it should work. +rep
                          Like the server? Become a regular! TGNS Required Reading
                          Answers to every server question? Yes! TGNS FAQ

                          Comment


                          • #14
                            Re: How do I disable services from command line?

                            Shutdown really does stop spam, though.
                            Steam Community? Add me. | Free Remote, Encrypted Backup

                            Darkilla: In short, NS is pretty much really fast chess. With guns. Apophis: I haven't seen anyone say that SM's are better than non-SMs. Nordbomber: This is THE first server I've seen where either side can comeback from out of seemingly nowhere with the right teamwork. en4rcment: I have NEVER experienced the type of gameplay that I have found here. Nightly I am amazed at the personalities and gaming talent. Zephyr: Apophis is clearly a highly sophisticated self-aware AI construct that runs on a highly modified toaster oven in Wyzcrak's basement.

                            Comment

                            Connect

                            Collapse

                            TeamSpeak 3 Server

                            Collapse

                            Advertisement

                            Collapse

                            Twitter Feed

                            Collapse

                            Working...
                            X