Jump to content

procceswait


Recommended Posts

my script should be able to wait until the process msiexec.exe is closed. my problem is: windows always runs a secound msiexec.exe. is there a command which could differ between an old msiexec.exe and the new one which only exists for a short period of time. here the small part of the script.

$checked1 = controlCommand("n2n", "", $chbx1, "ischecked", "")
         If ($checked1) Then
             run("c:\install\adberdr70_deu_full.exe")
             FileWriteLine($logdat, "Adobe Reader Installation gestartet " & $date & " " &  " " & $time)
             ProcessWait("msiexec.exe")
             ProcessWaitClose("msiexec.exe")

EndIf

Link to post
Share on other sites

found the best way to deal with adobe installs is to start the install, don't hit ok, find the folder where it extracted the files from the exe, there you'll find the msi file, then copy the files to another folder, exit the exe.

Then use the msi for the installation, you can use switches on the msi and runwait.

Gary

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to post
Share on other sites

Hey, this may be a little ignorant (forgive me, I'm not gr8 wiv the scripts) but why not run another processwait and process close if you know it comes up twice every time??? Then you capture both of them as they open.

Sorry if this is no help

Mark

Link to post
Share on other sites

with some research on the install packages most can be done in similar manner as adobe, or use the

$PID = run("command")
while (ProcessExists($PID))
  Sleep ( 1000 )
Wend

<{POST_SNAPBACK}>

the problem is first the programm (for example daemontools) uses daemon347.exe after that the process ends and the installationpart starts (msiexec.exe) so the script will go on after the process daemon347.exe ends.
Link to post
Share on other sites

most apps that use msiexec can be picked apart so that you can get to the msi, i rarely use the original exe from any place, most you can start the application and it extracts files to a temp folder, from there you can copy the files to another folder for your own use.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to post
Share on other sites

the main problem i have to solve is, there are about 30 setups i want to install with this script and i don't have the time to look in which way every setup works.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...