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 March 17th, 2005, 07:33 AM
Registered User
 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to know/identify that installation is done

From my application, I install some other package that are out of my control. Every installers behaviour is not the same. e.g

Case I with editplus installer

1 From my application I start the editplus installation
2 Store the main process id and wait for exit.
3 Once parent/main process get kill.
4 From the task manager list I check all the process whose parent id is equivalent to the one I stored.
5 If any child process exist then again wait for exit. (Now in this case there is no child process created. Goto step 7. )
6 Once all the child process get kill then contiune with some actions.
7 Continue with rest of the action

Case II with Photoshop

1 From my application I start the Photoshop installation
2 Store the main process id and wait for exit.
3 Once parent/main process get kill.
4 From the task manager list I check all the process whose parent id is equivalent to the one I stored.
5 If any child process exist then again wait for exit. (Now in this case there are two child processes get created. Goto step 6. )
6 Once all the child process get kill then contiune with some actions.
7 Continue with rest of the action

Case III with winamp lite

1 From my application I start the winamp lite installation
2 Store the main process id and wait for exit.
3 Once parent/main process get kill.
4 From the task manager list I check all the process whose parent id is equivalent to the one I stored.
5 If any child process exist then again wait for exit. (Now in this case there are two child processes get created. Goto 6.)
6 Once all the child process get kill then contiune with some actions.(but in this case, one process remains active, so could not goto step 7.)
7 Continue with rest of the action

In the above case I could not go to step 7 because one installer process remains active. How do I know/get notify that the installation is done/complete.

Regards,
Shiby Chacko
 
Old March 30th, 2005, 03:21 AM
Authorized User
 
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
Default

Dear,

I think you're having hard time finding exactly when does the application whose process id you have stored exit. This can be easily done using the Process class. This class lives in the System.Diagnostics namespace. The Process class raise an event named Exited when a process exits. For this event to be raised, however, you'll have to set the EnableRaisingEvent property to true.

In this way you can get notified on when the process you have started previously has exited. You can get detailed information on this class fom the .NET framework SDK.

Regards,

ejan





Similar Threads
Thread Thread Starter Forum Replies Last Post
identify increase automatic phuc2583 Classic ASP Basics 4 January 10th, 2008 08:00 PM
can we identify the text in the XSLT? rajatake XSLT 7 March 22nd, 2007 08:28 AM
How to identify the computer Name MuthuAL Classic ASP Databases 2 December 22nd, 2004 08:42 AM





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