473,382 Members | 1,692 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,382 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 1339

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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.