Solved

Unknown Error on Process.start

Posted on 2006-06-28
6
1,338 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now