473,657 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

ProcessStartInf o startupInfo = new ProcessStartInf o ();
startupInfo.Fil eName = filePath;
startupInfo.Use ShellExecute = true;
startupInfo.Cre ateNoWindow = 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.WaitFor Exit();
}

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 1368

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

Similar topics

0
288
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 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...
1
2111
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
2612
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 name or path being incorrect when there are spaces in the file name or in any subdirectory in the path. Has anyone else observed this and is there a workaround? Thanks. -- Joe Micheli CPA, CMA, CFM, CPIM
4
3568
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 calling the program with no arguments, which just returns some "how to use" text, and requires no user input. The problem is that once I do a .start on the process, the program just hangs indefinitely. I can see it running in the process list on...
0
889
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 clicking, runs flawlessly. However, when this application is run via Process.start, or Shell(), the application dies on the line where the DLL is dimmed. I get the following error,
2
465
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 they are being started under a network service account instead of the logged on users account. Is there a way i can start programs under the logged on users account ? Thanks
2
2453
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 program runs successfully but does not give control back to the service. After the Process.Start statement no code will execute. The program has exited and is not shown in process monitor. I am running the service under an admin account. See...
0
2246
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 with the "print"-verb. This works for me. However, I need to handle the case when a printing application doesnt't quit in a given timespan (for example a password-protected word-document). So I've tried the following:
0
7198
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 1.1 framework, but discovered that when I used Process.Start() the user's credentials were not impersonated, it just kept using the asp.net's user, so I switched the webservice over to 2.0 as Diagnostics.Process.StartInfo now has username,...
0
2238
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 computer, the problem comes when the file is in a network drive. The most amazing thing is that in one computer I can execute my .Net program without problems independently if the file is
0
8402
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8829
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.