I'm so glad you asked this question. I was banging my head on this all last
week and figured a few things out. To my knowledge there is no perl module
that will show you what child processes were spawned from a particular
parent process. I was trying to accomplish the same thing as you, getting
the status of a sliently installed application (InstallShield install
right?)
setup -s -f1 setup.iss
and it spawns a process with a ._MP extension.
Now here's the cool part, it seems InstallShield actually does display the
progress of the install, but it's a HIDDEN window! So, by writing a very
simple script, I was able to tell Windows to make the HIDDEN window VISIBLE.
BAM! Now I have a complete progress indicator for whatever app was being
silently installed. (In this case, Cold Fusion). Here's my code:
####
#Title is the title of the window, it's the
#same when it's running interactively. You can make a window invisible or
visible, Visible 0=invisible 1=visible.
#
#
#
#Script takes args from the command line, first
#title then visible (in case you want to hide it again).
#
#Syntax: unhide.pl "Cold Fusion Professional" 1
#The script will now wait for Cold Fusion Professional Window and then
Display it.
#You need Win32-Setupsup from
http://jenda.krynicky.cz/perl/Win32-Setupsup-1.0-PPM.tar.gz
########################
########################
use Win32::Setupsup;
$title=$ARGV[0];
$visible=$ARGV[1];
$windowprop{visible}=$visible;
my($timeout)=20000;
my($refresh)=100;
Win32::Setupsup::WaitForWindow($title,\$window,$timeout,$refresh);
Win32::Setupsup::SetWindowProperties($window, \%windowprop);
#END##########################
It's that simple. Now instead of monitoring the child process, you can
check for the existence of that window.
-----Original Message-----
From: Tristan Ball [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 12:49 AM
To: Perl-Win32-Users Mailing List
Subject: Process management and silent installs.
Hey ho folks.
Situation is this: I have a perl script that installs a bunch of apps
(it's part of our new pc setup procedure). Most are capable of doing
silent installs, some can't. Those which can't we have scripted. Those
that can, I'd like to do silently (strangely enough :-) ).
The problem I have is when finding when a silent install is finished, in
particular because most of them run up, extract themselves, and then run
something else to do the actuall install, often a temp file executable
like ac323523._MP and the like. As a result, if I monitor the initial
process, it tells me the install is done, because the process has
terminated, well before it actually finishes, because its the child
process that does the work.
How can I tell if the child process is still running?
OS is NT 4/SP[3-6].
Ta.
--
Tristan Ball
Vision Systems
System Administrator - Adelaide
PH (08) 83004771
---
You are currently subscribed to perl-win32-users as:
[EMAIL PROTECTED]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]
---
You are currently subscribed to perl-win32-users as: [[email protected]]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]