Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2004, 11:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Executing and monitoring external programs

I am doing automatic UI testing of some program. The test is done through a script layer that I have made. Each test is started from the command line, however I would like to make a launcher program that executes a series of these tests and perhaps through a UI.

The problem is I do not know which approach is the best. I have seen a thread that uses Process and some say ShellExecute or something like that.

What is the best approach for executing external program from another program when I would like as much control of the process, such as waiting for a result or even waiting in the parent program for termination of the called program?

Thanks in advance

Jacob.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
 
Old January 22nd, 2004, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think the Process class will do! Thanks anyway. Jacob.

 
Old February 24th, 2004, 02:26 PM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you can use WMI to watch the external program running from a process, also you can know when it is exiting or created etc.,
I am not sure about your requirement, but I am using WMI to watch the external process running.

Regards
Pradeep P

It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
 
Old February 24th, 2004, 04:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I managed to use Process, and it actually worked quite fine for the task at hand!

Thanks anyway :)

Jacob.






Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i distribute my programs to others ? jerryham VB.NET 7 September 29th, 2008 01:52 PM
executing external command from XSLT kapy_kal XSLT 4 June 9th, 2006 11:26 AM
Executing External Applications(.net) pkgonline .NET Web Services 0 February 21st, 2005 09:34 AM
executing programs marjanm PHP How-To 0 August 27th, 2004 06:23 AM
Executing an external program. saint VB.NET 2002/2003 Basics 3 July 22nd, 2003 08:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.