CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2006
    Posts
    285

    Execute exe file

    Hi
    I wanna ask.. Can i execute another exe file from C Builder using code... For example the user will press a button and the Microsoft Word will open after a while

  2. #2
    Join Date
    Oct 2005
    Location
    Bangalore
    Posts
    1,051

    Re: Execute exe file

    Refer this FAQ
    - Sreehari
    "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
    " Everybody is sent to Earth on a purpose. I am so Lagging behind that i won't die." – Calvin

  3. #3
    Join Date
    Jul 2006
    Posts
    285

    Re: Execute exe file

    But all these are too complicated there is no code for 2 or 3 rows????

  4. #4
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Execute exe file

    Quote Originally Posted by Leite33 View Post
    But all these are too complicated there is no code for 2 or 3 rows????
    Each one of the methods posted is a SINGLE line of code (a function call) with appropriate initialization done as distinct statements for readability, and with error checking for the results.

    How much simpler could it be????
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  5. #5
    Join Date
    Jul 2006
    Posts
    285

    Re: Execute exe file

    I mean that is much code of the examples that you send me before... For example
    WinExec().. Can i use that??? What the syntax will be??? Can i bring an error message if doesnt work???(the file or application doesnt exist);
    Thanks

  6. #6
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Execute exe file

    Quote Originally Posted by Leite33 View Post
    I mean that is much code of the examples that you send me before... For example
    WinExec().. Can i use that??? What the syntax will be??? Can i bring an error message if doesnt work???(the file or application doesnt exist);
    Thanks
    That is all covered in the link that sreehari posted nearly 24 hours ago, and in the documentation for the API / System calls that are used.....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

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