launching own application using System.Diagnostics


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: launching own application using System.Diagnostics

  1. #1
    Join Date
    Jul 2006
    Posts
    91

    launching own application using System.Diagnostics

    Hi,
    I am trying to launch an application using System.diagnostics.Process.Start. Intaillay , I tried to launch Explorer.exe, with the following code:-

    System.Diagnostics.ProcessStartInfo exp = new System.Diagnostics.ProcessStartInfo();
    exp.FileName = " explorer.exe ";
    System.Diagnostics.Process.Start(exp);

    This code launched explorer.exe. My question is how does start() method knows Were the “explorer.exe” application is reciding in my system?.

    Because, I was trying to launch my own window application called “copy_prj.exe” and I think, I need to tell the above program were it can find it, I mean the path to that “copy_prj.exe” application.

    Say for example, my windows application (“copy_prj.exe” )is located in:-
    "C:\\perforce\\AVC\\release_branches\\ER4\\AVCSDK\\bin"

    How can I tell the above program to launch my windows application?. Do I need to set “EnvironmentVariables” property?. If, so can you give me an example.

    Thanks,

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    You would simply feed it the path as you did in your example.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    I do it like this:
    Code:
    System.Diagnostics.Process exp = new System.Diagnostics.Process();
    exp.StartInfo.FileName = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";
            exp.Start();

    Quote Originally Posted by srinivasc_it
    Hi,
    I am trying to launch an application using System.diagnostics.Process.Start. Intaillay , I tried to launch Explorer.exe, with the following code:-

    System.Diagnostics.ProcessStartInfo exp = new System.Diagnostics.ProcessStartInfo();
    exp.FileName = " explorer.exe ";
    System.Diagnostics.Process.Start(exp);

    This code launched explorer.exe. My question is how does start() method knows Were the “explorer.exe” application is reciding in my system?.

    Because, I was trying to launch my own window application called “copy_prj.exe” and I think, I need to tell the above program were it can find it, I mean the path to that “copy_prj.exe” application.

    Say for example, my windows application (“copy_prj.exe” )is located in:-
    "C:\\perforce\\AVC\\release_branches\\ER4\\AVCSDK\\bin"

    How can I tell the above program to launch my windows application?. Do I need to set “EnvironmentVariables” property?. If, so can you give me an example.

    Thanks,

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    All you really need to do is
    Code:
    System.Diagnostics.Process.Start("C:\Program Files\Internet Explorer\IEXPLORE.EXE")
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Jul 2006
    Posts
    91
    Yes got it. Thanks

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    You are welcome.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 06-15-2005, 07:31 PM
  2. Inventory Management Application Using VB
    By Krishna in forum vb.announcements
    Replies: 0
    Last Post: 11-25-2002, 11:03 PM
  3. Execute and application
    By Marco Losavio in forum .NET
    Replies: 0
    Last Post: 08-22-2002, 09:49 AM
  4. Launching application on client side without ActiveX
    By John Rodrick in forum Open Source
    Replies: 0
    Last Post: 12-12-2001, 05:48 PM
  5. Application that grows
    By Ian Drake in forum .NET
    Replies: 1
    Last Post: 11-21-2001, 01:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center