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. Process launching

Process launching

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 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.
  • M Offline
    M Offline
    Masud Alipour
    wrote on last edited by
    #1

    Dear all I want to launch a process from another process. I have tested "WinExec", "CreateProcess", "ShellExecute" and "ShellExecuteEx" APIs. In all of them, the lanuched process becomes child of the caller process. But I need that lauched proccess does not have a parent or has another parent e.g. "explorer" process. Indeed I have a Windows Service which I want to launch a GUI application from it. In addition I don't want to set Service as an Interactive Service. Any help would be appreciated

    M 1 Reply Last reply
    0
    • M Masud Alipour

      Dear all I want to launch a process from another process. I have tested "WinExec", "CreateProcess", "ShellExecute" and "ShellExecuteEx" APIs. In all of them, the lanuched process becomes child of the caller process. But I need that lauched proccess does not have a parent or has another parent e.g. "explorer" process. Indeed I have a Windows Service which I want to launch a GUI application from it. In addition I don't want to set Service as an Interactive Service. Any help would be appreciated

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Masud Alipour wrote: But I need that lauched proccess does not have a parent It looks like the CREATE_NEW_PROCESS_GROUP flag to CreateProcess``() will do that. --Mike-- LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

      J 1 Reply Last reply
      0
      • M Michael Dunn

        Masud Alipour wrote: But I need that lauched proccess does not have a parent It looks like the CREATE_NEW_PROCESS_GROUP flag to CreateProcess``() will do that. --Mike-- LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

        J Offline
        J Offline
        J B 0
        wrote on last edited by
        #3

        Dear Mike, I am trying to do the same, but using CREATE_NEW_PROCESS_GROUP will not make the launched process be a direct descendent of "explorer.exe". Is it because the calling process that calls CreateProcess() is not a parent? What I mean is, imaganing the following process tree from top to bottom. explore.exe-->A.exe->B.exe The calling process is "B.exe", which calls CreateProcess()with CREATE_NEW_PROCESS_GROUP to create "C.exe". And I found "C.exe" becomes a child process of A.exe, instead of "explorer.exe" Is it normal? Is it possible to move "C.exe" the be at least the level as "A.exe"? Thanks in advance, Johnny

        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