Sign in to follow this  
Followers 0
Guest nap

procceswait

13 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

 

Share this post


Link to post
Share on other sites

forgot to mention the runwait uses msiexec /i "msi file" /qb

this way your script waits on the msiexec you start not the ones adobe starts.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

but adobe isn't the only thing i want to install. this was just a small example taken out of my script.

Share this post


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

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


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

Share this post


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.

Share this post


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.

 

Share this post


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.

Share this post


Link to post
Share on other sites

in the time it has taken to respond to these posts, i have done what i've told you to try to 3 setup packages, I do this on a regular basis.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

k i think your sulution would work. could u tell me some command which can check if a file excists or not?

Share this post


Link to post
Share on other sites

k i think your sulution would work. could u tell me some command which can check if a file excists or not?

<{POST_SNAPBACK}>

FileExists

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

thx a lot for your help guys but i did it with sleep. the installation of the apps only take 15 secs so i used sleep(15000).

Share this post


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
Sign in to follow this  
Followers 0