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 / C++ / MFC
  4. How do I know status of a service in a remote machine ?

How do I know status of a service in a remote machine ?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 2 Posters 1 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.
  • S Offline
    S Offline
    SherTeks
    wrote on last edited by
    #1

    Hello, How can I get the status of a service (Running, Stopped, etc) in a remote machine. I've the domain (of the remote machine) username and password. I need to get the status programmatically without using any tool. FYI : I'm using VC 6.0 Thanks in advance

    _ 1 Reply Last reply
    0
    • S SherTeks

      Hello, How can I get the status of a service (Running, Stopped, etc) in a remote machine. I've the domain (of the remote machine) username and password. I need to get the status programmatically without using any tool. FYI : I'm using VC 6.0 Thanks in advance

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You can give the remote machine name in the first parameter of OpenSCManager function. Then use the QueryServiceStatusEx function to get the status of the service. To impersonate another user you can use LogonUser and ImpersonateLoggedOnUser APIs.

      «_Superman_» I love work. It gives me something to do between weekends.

      S 1 Reply Last reply
      0
      • _ _Superman_

        You can give the remote machine name in the first parameter of OpenSCManager function. Then use the QueryServiceStatusEx function to get the status of the service. To impersonate another user you can use LogonUser and ImpersonateLoggedOnUser APIs.

        «_Superman_» I love work. It gives me something to do between weekends.

        S Offline
        S Offline
        SherTeks
        wrote on last edited by
        #3

        Thanks for the info. I'll try those.

        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