
yskumar
New User
Jun 11, 2011, 7:15 AM
Post #1 of 4
(931 views)
|
|
How to wait until system() called execution finishes
|
Can't Post
|
|
Hi all, I want to uninstall and install some softwares in windows through a perl script. For that I will make use of system() function . ie system(software.exe /s /x -s -v -l) where /s is for silent mode, /x for unistallation and other arguments are for starting the service immediately etc etc. After this I will use the system function to uninstall some other software . Then once again to install two more softwares. But each uninstallation and installation will take some time. So my question is which is the best way to wait until one installation or uninstallation finishes so that I can go for the next ? If I go for attended un/installation it will wait because the software will prompt for user inputs. But I am facing the problem when going for unattended un/installation , it wont wait until the execution finishes and due to that installation of the same software starts before the uninstallation finishes. Any help will be appreciated.
|