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. COM
  4. Invoking exe from windows service(COM Exe runs as service)

Invoking exe from windows service(COM Exe runs as service)

Scheduled Pinned Locked Moved COM
c++comtutorial
2 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.
  • K Offline
    K Offline
    KTTransfer
    wrote on last edited by
    #1

    I want to invoke exe(MFC without GUI) from windows service(COM Exe runs as service). I am using CreateProcessAsUser and trying to invoke, it invokes(when it invokes i am writing log) but not visible in taskmanager. I doubt that the exe is getting invoked under "SYSTEM" and that is the reason its not visible in taskmanager and nor it works(obvious). But I want to invoke under "User"(who is logged in). To do so I tried using LogonUser but it needs username and password of user who is logged in machine. That I cant access. Please guide me or give me clue. Requirement is: Exe should run under the user who is logged in. Regards, KTTransfer.

    A 1 Reply Last reply
    0
    • K KTTransfer

      I want to invoke exe(MFC without GUI) from windows service(COM Exe runs as service). I am using CreateProcessAsUser and trying to invoke, it invokes(when it invokes i am writing log) but not visible in taskmanager. I doubt that the exe is getting invoked under "SYSTEM" and that is the reason its not visible in taskmanager and nor it works(obvious). But I want to invoke under "User"(who is logged in). To do so I tried using LogonUser but it needs username and password of user who is logged in machine. That I cant access. Please guide me or give me clue. Requirement is: Exe should run under the user who is logged in. Regards, KTTransfer.

      A Offline
      A Offline
      Ahmed Charfeddine
      wrote on last edited by
      #2

      Interaction between services and user-objects is difficult to achieve and also it is not advised that you do it. Note finally that there is a service property in the "connection tab" in the SCM interface that you may have to enable. Good luck.

      Easy Profiler : Now open source ! http://www.codeproject.com/KB/cpp/easyprofiler.aspx

      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