473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problems with Process.Start

I am deveeloping a WinForm application where I need to display a HTML
page to the user. I would like to use IE to display this page then
wait until they have closed the IE window before continuing with the
application. Essentially, I want to make a blocking call to IE.

However, when I use the code below, I get vvariable results depending
on whether or not the process is running within the IDE or stand
alone.

ProcessStartInfo startupInfo = new ProcessStartInfo ();
startupInfo.FileName = filePath;
startupInfo.UseShellExecute = true;
startupInfo.CreateNoWindow = true;
Process process = Process.Start (startupInfo);
// For some reason, the process object is valid in the debugger but
not when running in stand alone
// Put this frig in until a suitable solution is found.
if( process != null )
{
process.WaitForExit();
}

The filePath variable is set to be the fully qualified path of the
HTML page to be displayed.

When executed within the IDE this works fine and the blocking call is
made. However, when in stand alone, the process object is null
directly after the call to Process.Start.

Can anyone explain why this is or is there a workaround?

Thanks.

Jul 21 '05 #1
0 1341

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen.Haeney | last post by:
I am deveeloping a WinForm application where I need to display a HTML page to the user. I would like to use IE to display this page then wait until they have closed the IE window before continuing...
1
by: Marius Horak | last post by:
Hello, Program I want to execute is D:\Inetpub\ftproot\mtn\production\ToMin.EXE When I execute myExe = "D:\Inetpub\ftproot\mtn\production\ToMin.EXE"; Process.Start(myExe, "");
1
by: joseph micheli | last post by:
When using System.Diagnostics.Process.Start method, I find that it does not like spaces in the filepath. I've experimented with different scenarios, and I get an error message regarding the file...
4
by: Jesse Cates via DotNetMonster.com | last post by:
I am trying to launch a command-line program that came with a program called Live Stats. This command-line program is used to automate configuration of Live Stats. In order to test this, I am just...
0
by: PokerJoker | last post by:
I created a monitor program that checks for certain critera and then launches other executables to perform maintenence tasks. One of these executables uses a DLL, when launched by double...
2
by: Jm | last post by:
Hi All Im using a windows service program written in vb.net using the system.diagnostics.process.start to open exe files but im getting few strange problems that seem to be caused by the fact...
2
by: brian.gabriel | last post by:
I am trying to kick of a DOS program from a VB.Net service. The program works fine when called from a batch file, and from a Windows form, but it has problems when called from a service. The...
0
by: henning.friese | last post by:
Hello NG, I'm need to write some code which creates tiff files from various document types (doc, pdf, xls). I want to do this by ShellExecuting (via System.Diagnostics.Process) the doc-files...
0
by: Paul | last post by:
Hi, I'm trying to kick off the iiscnfg.vbs from a webservice to export a website's config to an xml file (And eventually populate other servers with the config). I initially tried this using the...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.