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. ShellExecute question

ShellExecute question

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

    Dear all, I want to execute a separate program from my dialog using a button. I have used WinExec, ShellExecute and CreateProcess and get the same problem. The button works fine as long as I build and run my program from Visual C++. But when I run the program independently by double-clicking its exec file from its folder and try the button, it does not work and the other application does not start. This happens on any operating system I tried. Here is the code: HINSTANCE HINSCursorsd = ShellExecute (NULL,"open","../TestExeNew.exe",NULL,NULL,SW_SHOWNORMAL); Your help is most greatly appreciated. Thanks,

    P 1 Reply Last reply
    0
    • 5 5iveboy

      Dear all, I want to execute a separate program from my dialog using a button. I have used WinExec, ShellExecute and CreateProcess and get the same problem. The button works fine as long as I build and run my program from Visual C++. But when I run the program independently by double-clicking its exec file from its folder and try the button, it does not work and the other application does not start. This happens on any operating system I tried. Here is the code: HINSTANCE HINSCursorsd = ShellExecute (NULL,"open","../TestExeNew.exe",NULL,NULL,SW_SHOWNORMAL); Your help is most greatly appreciated. Thanks,

      P Offline
      P Offline
      palbano
      wrote on last edited by
      #2

      HINSTANCE HINSCursorsd = ShellExecute (NULL,"open","../TestExeNew.exe",NULL,NULL,SW_SHOWNORMAL); The path is probably not the same :eek:

      "No matter where you go, there your are." - Buckaroo Banzai

      -pete

      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