What version of the Oracle Client? How about making the patch the main package and the Oracle Client a dependent package or prerequisite.
version 9.2, with patch 22.214.171.124 ... I want to install them at the same time if someone needs vers 9, so pre-req won't work ... and dependent package won't work because the main install will appear to finish immediately (because setup.exe spawns a separate process)
I hate it when setup.exe spawns a separate process. Then returns and error code as if it was finished.
I once wrote a batch file that looped until the "spawned" process ended.
REM My Batch File REM Run Setup setup.exe REM Because setup.exe launches a separate process, lets watch that process. REM What is the process name? I hope it isn't random cause if so, I don't know REM how to make it work. For this example, I will use notepad.exe :watcher REM Use LDSLEEP.EXE (include it as an additional file) REM ldsleep 5 REM or use PING to wait 5 seconds since it is already on all clients. ping -n 5 localhost tasklist |findstr notepad.exe ECHO %ERRORLEVEL% IF %ERRORLEVEL%==0 GOTO watcher GOTO end :end EXIT /B 0
Now you can use a dependent package because the second package really won't install until the first package actually finishes.
Not sure what you mean by I want to install them at the same time if someone needs vers 9, so pre-req won't work . The Oracle client (Prereq) will install first and then the main package - Patch will install after that. I do understand spawing and it sucks! Not at work right now will check our package later. But if the Setup.exe is an Installshhield exe you can use /SMS. I use all the time and it works with runwait (PackageBuilder, Autoit, etc...) Trying to remeber if it is a InstallShield EXE or not. Very easy to do in AutoitScript using processwait* functions. Also if you can't this resolved here I would suggest a post to the APPDEPLOY forums.
/SMS Instructs a silent setup not to release the current session until the installation is complete. Without this switch a silent installation will immediately appear complete and run in the background. use this switch to have any additional installations or script actions wait for installation to complete (such as in a batch file). The parameter was introduced to support MS Systems Management Server which would temporarily map a drive during installation to access source files (where it would immediately complete, and SMS would unmap the drive to the source files before the installation was complete.)
Thanks - rhyous ... I've thought of doing some like that too, but I was hoping someone actually found an easier way to just run them in sequence.
zman ... I don't think it's an installshield EXE. Thanks for the tip about autoitscript's processwait function, I will look into that.
The function in AutoIt is "ProcessWaitClose", and it does seem to work. I created a generic EXE (that I'll call processwait.exe), and it accepts a process name (such as notepad.exe) via commandline parameter. When processwait.exe exits, I know that the process it was checking for is gone. I can use this in a package to kick off the install, run processwait.exe to check for a process to close, then kick off the next step.
If anyone else wants a copy of my script, here's the one and only line of code: ProcessWaitClose($CmdLine)
NOTE: $CmdLine is the first parameter passed via cmdline. If you pass an EXE that has spaces in it, they will be treated as separate parameters. So you'll need to change the code a little. Also, this will wait until ALL instances of a process are closed (e.g., 3 copies of notepad.exe are running).
This will work for my Oracle package, but if anyone finds a better way to either slipstream Oracle installs/patches, or at least run them together in sequence, please let me know.
1 of 1 people found this helpful
Good Stuff!!! Autoit has saved my a@@ so many times.......