Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. to get all services in the machine

to get all services in the machine

Scheduled Pinned Locked Moved C#
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prasadbuddhika
    wrote on last edited by
    #1

    how can i get all the services running or installed in the local machine

    J 1 Reply Last reply
    0
    • P prasadbuddhika

      how can i get all the services running or installed in the local machine

      J Offline
      J Offline
      John Gathogo
      wrote on last edited by
      #2

      Depending on what you mean by "get", Typing "net start" on your command prompt will list for you the services running on your computer. For programmatic access you can use ServiceController class after importing the corresponding namespace.

      P 1 Reply Last reply
      0
      • J John Gathogo

        Depending on what you mean by "get", Typing "net start" on your command prompt will list for you the services running on your computer. For programmatic access you can use ServiceController class after importing the corresponding namespace.

        P Offline
        P Offline
        prasadbuddhika
        wrote on last edited by
        #3

        thanx, there is another problem i'm experiencing,i used the servicecontroller to get all the services in the local machine.the problem is some services like(apache) can be started and stopped through this , but services like sqlserver service can't be stopped.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups