By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,932 Members | 1,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,932 IT Pros & Developers. It's quick & easy.

Why cannot start Process using C#?

P: n/a
Yiu
upgent help
i want to start IE explorer using C#
i try many code such as below:
ProcessStartInfo startInfo = new ProcessStartInfo("IEXPLORE.EXE");
Process.Start(startInfo);

or

Process process = new Process();
process.StartInfo.FileName = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";
process.StartInfo.Arguments = "http://www.simonweaver.com/";
process.StartInfo.CreateNoWindow = false;
process.StartInfo.UseShellExecute = true;*/
process .Start();

or

Process.Start("IEXPLORE.EXE","www.yahoo.com");

no any error (include running error) appear,
but the application does not appear
Help!!!
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Yiu" <bi********@yahoo.com.hk> wrote in message
news:6d*************************@posting.google.co m...
upgent help
i want to start IE explorer using C#
i try many code such as below:
ProcessStartInfo startInfo = new ProcessStartInfo("IEXPLORE.EXE"); Process.Start(startInfo);

or

[snip]

This worked on my machine:

Process process = new Process();

process.StartInfo.FileName = "http://www.simonweaver.com/";

process.StartInfo.Arguments = "";

process.StartInfo.CreateNoWindow = false;

process.StartInfo.UseShellExecute = true;

process.Start();

Good Luck!

Markus
Nov 15 '05 #2

P: n/a
Yiu wrote:
upgent help
i want to start IE explorer using C#
i try many code such as below:
ProcessStartInfo startInfo = new ProcessStartInfo("IEXPLORE.EXE");
Process.Start(startInfo);

or

Process process = new Process();
process.StartInfo.FileName = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";
process.StartInfo.Arguments = "http://www.simonweaver.com/";
process.StartInfo.CreateNoWindow = false;
process.StartInfo.UseShellExecute = true;*/
process .Start();

or

Process.Start("IEXPLORE.EXE","www.yahoo.com");

no any error (include running error) appear,
but the application does not appear
Help!!!

The above will get you going but have a look here for more details:
http://tinyurl.com/2j73y (MSDN site)

--
chris
Nov 15 '05 #3

P: n/a
Try this:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName="iexplore";
proc.StartInfo.Arguments="http://www.microsoft.com";
proc.Start();
proc.WaitForExit();
It is try and true.

Thanks,

J
--------------------
NNTP-Posting-Date: Fri, 30 Jan 2004 07:21:28 -0600
Date: Fri, 30 Jan 2004 08:21:29 -0500
From: chris <ne********@boxfrog.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: microsoft.public.dotnet.languages.csharp
Subject: Re: Why cannot start Process using C#?
References: <6d*************************@posting.google.com>
In-Reply-To: <6d*************************@posting.google.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <Ns********************@comcast.com>
Lines: 30
NNTP-Posting-Host: 66.31.58.30
X-Trace: sv3-JyvEz4bEj+oc6G2BWL31spBcj9JeIEpR+StjkfT0Z2wDYYVXed EUmL8V9WSvJJqkjNczuHHy
5YBvaoZ!QJUwTPxQeVW9W55kPTsxpX2IvZY9cQH/uDtI7mBfHO5dQKfyQsm1UUijByg=X-Complaints-To: ab***@comcast.net
X-DMCA-Complaints-To: dm**@comcast.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properlyX-Postfilter: 1.1
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!c03 .atl99!sjc
70.webusenet.com!news.usenetserver.com!pd7cy2so!sh aw.ca!border1.nntp.ash.gig
anews.com!border2.nntp.sjc.giganews.com!border1.nn tp.sjc.giganews.com!nntp.g
iganews.com!local1.nntp.sjc.giganews.com!nntp.comc ast.com!news.comcast.com.P
OSTED!not-for-mailXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:216675
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Yiu wrote:
upgent help
i want to start IE explorer using C#
i try many code such as below:
ProcessStartInfo startInfo = new ProcessStartInfo("IEXPLORE.EXE");
Process.Start(startInfo);

or

Process process = new Process();
process.StartInfo.FileName = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE"; process.StartInfo.Arguments = "http://www.simonweaver.com/";
process.StartInfo.CreateNoWindow = false;
process.StartInfo.UseShellExecute = true;*/
process .Start();

or

Process.Start("IEXPLORE.EXE","www.yahoo.com");

no any error (include running error) appear,
but the application does not appear
Help!!!

The above will get you going but have a look here for more details:
http://tinyurl.com/2j73y (MSDN site)

--
chris


Nov 15 '05 #4

P: n/a
Yiu
Sorry Markus
why i run your have the error say cannot find the file?
"Markus Seger" <ma**********@gmx.de> wrote in message news:<bv************@ID-71740.news.uni-berlin.de>...
"Yiu" <bi********@yahoo.com.hk> wrote in message
news:6d*************************@posting.google.co m...
upgent help
i want to start IE explorer using C#
i try many code such as below:
ProcessStartInfo startInfo = new

ProcessStartInfo("IEXPLORE.EXE");
Process.Start(startInfo);

or

[snip]

This worked on my machine:

Process process = new Process();

process.StartInfo.FileName = "http://www.simonweaver.com/";

process.StartInfo.Arguments = "";

process.StartInfo.CreateNoWindow = false;

process.StartInfo.UseShellExecute = true;

process.Start();

Good Luck!

Markus

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.