Solved

Unknown Error on Process.start

Posted on 2006-06-28
6
1,348 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

821 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