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 to distinguish start method

How to distinguish start method

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
5 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.
  • C Offline
    C Offline
    chenxiujie
    wrote on last edited by
    #1

    Hello ! Who can tell me how to distinguish the following case: case1: Prog.exe is started by double click. case2: Prog.exe is started by operating system. case3: prog.exe is started by other program.(for example: ShellExecute()) Distinguish means in the prog, to distinguish. Thanks!

    J J 2 Replies Last reply
    0
    • C chenxiujie

      Hello ! Who can tell me how to distinguish the following case: case1: Prog.exe is started by double click. case2: Prog.exe is started by operating system. case3: prog.exe is started by other program.(for example: ShellExecute()) Distinguish means in the prog, to distinguish. Thanks!

      J Offline
      J Offline
      Jun Du
      wrote on last edited by
      #2

      It's a very interesting question, but I'm not sure there is a way. Just for curiosity, why do you want to distinguish them? Best, Jun

      C 1 Reply Last reply
      0
      • J Jun Du

        It's a very interesting question, but I'm not sure there is a way. Just for curiosity, why do you want to distinguish them? Best, Jun

        C Offline
        C Offline
        chenxiujie
        wrote on last edited by
        #3

        :), the requirement is that: There is a program (let's name it A.exe), if user double click the A.exe, it doesn't reponse, by other words, user can't start it by double click. But the A.exe can be started by another program B.exe, and after user setting, the A.exe can start when the user log in the system(XP or vista). Best Regards,

        J 1 Reply Last reply
        0
        • C chenxiujie

          :), the requirement is that: There is a program (let's name it A.exe), if user double click the A.exe, it doesn't reponse, by other words, user can't start it by double click. But the A.exe can be started by another program B.exe, and after user setting, the A.exe can start when the user log in the system(XP or vista). Best Regards,

          J Offline
          J Offline
          Jun Du
          wrote on last edited by
          #4

          I'm not quite clear about this requirement:

          chenxiujie wrote:

          after user setting, the A.exe can start when the user log in the system(XP or vista).

          Best, Jun

          1 Reply Last reply
          0
          • C chenxiujie

            Hello ! Who can tell me how to distinguish the following case: case1: Prog.exe is started by double click. case2: Prog.exe is started by operating system. case3: prog.exe is started by other program.(for example: ShellExecute()) Distinguish means in the prog, to distinguish. Thanks!

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #5

            If you require prog.exe to be started with a parameter, you'll foil all double click attempts. For instance, "prog.exe" just terminates, but "prog.exe /run" makes it run.

            -- 100% natural. No superstitious additives.

            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