CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Texas, USA
    Posts
    1,206

    How to open another program

    I need a way to specify a path to a *.exe file and tell windows to execute that program.

  2. #2
    Join Date
    Dec 2002
    Location
    St.Louis MO, USA
    Posts
    672

    Re: How to open another program

    Try to Use ShellExecute or ShellExecuteEx or WinExec functions to execute another application from ur code.
    A Person who is polite is given goodness and a person who is away from Politeness is away from Goodness.

    NAUMAAN

  3. #3
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

    Re: How to open another program

    Quote Originally Posted by MrDoomMaster
    I need a way to specify a path to a *.exe file and tell windows to execute that program.
    What you mean by specifying a path to a*.exe? For launching the application, as already mentioned, you can use ShellExecute or CreateProcess. For details, have a look at Processes: How can I start a process?

    Furthermore, note that WinExec() is provided only for compatibility with 16-bit Windows and should not be used any longer.

  4. #4
    Join Date
    Feb 2004
    Location
    Texas, USA
    Posts
    1,206

    Re: How to open another program

    Thanks guys, I found out about CreateProcess and I used that. It works perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured