K1000 scripting - How to make task 2 wait for task 1 to finish
I am trying to create a script that installs 2 pieces of software. One is the Microsoft Visual c++ 2005 Redistributable and the other is IBM System I Access for Windows V6R1M0.
At the moment I have them set up in 2 tasks, but it seems that The IBM System I task is kicking off before the C++ Redistributable has finished, thus failing.
I have attached a screenshot of the script.
If the c++ redistributable is not installed, the script will install it, but the IBM System I installation will fail. But if the c++ redistributable is already installed, it will skip task 1 and perform task 2 and install IBM System I.
So how can I make Task 2 wait for Task 1 to complete? As you can see, the Task 2 is referencing an MI, so I do not want to edit the install.bat that I have already created with a pause at the start, unless it is absolutely necessary.
EDIT - Just wanted to let people know that I am fairly new to scripting, so please let me know if I am doing it completely wrong :)
Hi All, Thank you all for your help. I ended up adding the installation of the Visual C++ redistributable as the first step in the IBM Install.bat file. :: :: Microsoft Visual C++ 2005 Redistributable Installation msiexec.exe /i 2005vcredist_x86\vcredist.msi /q :: :: IBM System i Access for Windows V6R1M0 Installation start /wait AS400\cwbinstall.msi /qn REBOOT=ReallySuppress :: XCOPY "SSLKey" "C:\Program FIles\IBM\SSLKey" /I /Y /E :: regedit.exe /s as400keydatabaseXP.reg :: XCOPY "Session" "C:\Program Files\IBM\Client Access\Emulator\Private" /I /Y /E :: copy "AS400 Display Session.lnk" "C:\Documents and Settings\All Users\Desktop\" :: del "C:\Documents and Settings\All Users\Desktop\IBM System i Access for Windows.lnk" del "C:\Documents and Settings\All Users\Desktop\System i Navigator.lnk"