Results 1 to 4 of 4

Thread: How to open an exe file using C#.net

  1. #1

    Thread Starter
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    How to open an exe file using C#.net

    Hi every body..

    This is my first thread in C#...Im very new to C#.net..

    I just want to know that is it possible to open an external exe file using C#.Net...
    for example i want to open MSWORD.exe , then in VB i used to write code like
    VB Code:
    1. shell c:\pfiles\msword.exe

    is there any porvision like this in C#.net..???

    thanx & regards
    Srikanth
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: How to open an exe file using C#.net

    Code:
    Process.Start (@"C:\PathName\Filename.exe");
    Read more about process class on MSDN.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3

    Thread Starter
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: How to open an exe file using C#.net

    thanQ ali... I will chk out the process class..and revert back in case of doubts...


    Thanx & regards
    Srikanth
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  4. #4
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: How to open an exe file using C#.net

    You can also usually just pass a filename to process.start and it will open with the user's current application (for example if I were using OpenOffice for .DOC files instead of word)

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

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