Solved

Unknown Error on Process.start

Posted on 2006-06-28
6
1,345 Views
Last Modified: 2008-02-01
I am getting an Unknown Error message when calling process.start.  My code is below.  I have copy and pasted the filename into the Run prompt and IE does launch so I know that is valid, I have also pasted from the clipboard into the address bar and the URL is valid.

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.EnableRaisingEvents = false;
process.StartInfo.FileName = @"C:\Program Files\Internet Explorer\iexplore.exe";
process.StartInfo.Arguments = url;
Clipboard.SetDataObject(url);
process.Start();


I do have a try/catch around the code, and there is no inner exception.  The error message I get is "Unknown error 0xffffffff".  This is running in a desktop app, and used to work.  I don't know what has changed on the computer in the last 3 months to make it not work, but the code did not change.
0
Comment
Question by:SkipFire
  • 3
  • 2
6 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 17001234
Try to run directly URL:
process.StartInfo.FileName = url;

This will work like ShellExecute, running program associated with file name. For URL, this is Windows Explorer.
0
 
LVL 8

Assisted Solution

by:Shakti109
Shakti109 earned 300 total points
ID: 17019867

Have you applied any service patches or operating system updates to the system(s)?

A change in security (or tightening of security policy) will definately affect your ability to do external program launches.


In effect, you are doing what a web pop-up does.
To test and see if it is limited to internet explorer you could try :

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.EnableRaisingEvents = false;
process.StartInfo.FileName = @"C:\windows\system32\calc.exe";
process.Start();

If calc.exe (the system calculator) works and the call to internet explorer does not, you may have a problem with the security settings.

If calc.exe does NOT work, there may be a system policy preventing launching of applications BY an application without some kind of impersonation or security rights.
0
 
LVL 4

Author Comment

by:SkipFire
ID: 17043977
AlexFM - your suggestion did function, however it pops up in the already open window, I need it to open into a new window which is what happens when you do "iexplore <url>".
Shakti109 - I still get unknown error with calc.  How can I determine if it is a policy change?  I have not changed the policy on my machine, but the domain admins could have pushed out a new policy to the domain.

Still need help on this one, but thanks for the help so far guys.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 8

Expert Comment

by:Shakti109
ID: 17087526


I have tried this (opening the calculator) under several user contexts on a test machine and am able to fire up the calculator process under all of them.


Hrm...When you say "unknown error", is that what the error text says?

0
 
LVL 4

Author Comment

by:SkipFire
ID: 17089450
The error text is unknown error.
0
 
LVL 4

Author Comment

by:SkipFire
ID: 17234248
The code is now executing without me having changed anything.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question