I've found a couple of things that could be interesting:
1)
Using msiexec with commandline switches2)
it is not so easy, because most of software installers has no command line support for batch mode installations
3) (for the programmers out here who can help the OP by reading this):
You could package the applications you want to install into the projects resource file, then at run time unpack them into a temporary location and execute them. Depending on what it is you packing\unpacking you may be able to use the /S or /Silent parameters. If not, why not have a go at doing what the install program does manually. It should all be possible..
Heres an example
http://download.microsoft.com/download/vb60ent/samp10/1/win98/en-us/resfile.exe
SUMMARY
RESFILE.EXE is a sample project that shows how to store any file type in a resource file and retrieve the file for use at run-time.
http://support.microsoft.com/kb/194409
4) Less interesting, an application that does it for you:
AllMyApps5) (Also for the programmers out there to help the OP) A guy who wrote such a script, but his full source is not available:
I wrote a script to install multiple applications but would like them to wait until the previous install is complete. I know I can use the WSCript.Sleep command but I believe I can only vary that command on a time limit. I need something that acts like...install application 'a'; install application 'b' once installation for application 'a' is complete; install application 'c' once installation for application 'b' is complete.
This is a small piece from my script:
objShell.Run "\\sdc-ris\MSI_Package\gpo\Application_GPO\Illustrator\Illustrator.vbs"
objShell.Run "\\sdc-ris\MSI_Package\gpo\Application_GPO\InDesign\InDesignCS2.vbs"
objShell.Run "\\sdc-ris\MSI_Package\gpo\Application_GPO\Quark\Quark6.vbs"
---------
Taken from the WSH documents
Run Method
bWaitOnReturn
Optional. Boolean value indicating whether the script should wait for the program to finish executing before continuing to the next statement in your script. If set to true, script execution halts until the program finishes, and Run returns any error code returned by the program. If set to false (the default), the Run method returns immediately after starting the program, automatically returning 0 (not to be interpreted as an error code).
6) "Linking Multple MSI files through VB script"
Solution 1Accepted Solution (works):
objshell = createobject("shell.scriptingobject")
objshell.run "c:\1.msi"
objshell.run "c:\2.msi"
Solution 2I don't believe that ShellExecute is really going to provide the functionality that you want without some serious pain. If you can use WSH the following code will work fine:
Dim wsh
Set wsh = CreateObject("WScript.Shell")
wsh.run "msiexec /i foo.msi", ,1
wsh.run "msiexec /i foo2.msi", ,1
If it truly is impossible to use, another options, albeit a bit painful, would be to use the start.exe command found in NT-based OS's. You could write a batch file which looks like this:
start /wait msiexec /i foo.msi
start /wait msiexec /i foo2.msi
Not sophisticated, but functional.
If, by chance, you have access to modify the MSI's - you could also write custom actions to essentially "chain" the MSI's internally.
You could also write a wrapper MSI which would launch all of the other MSI installations with the appropriate command lines. This, again, is a bit unconventional and quite messy. Wise for Windows Installer would make this task fairly easy, though.
Treval