How to install multiple MSIs from a web site?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeff00seattle
Forum Commoner
Posts: 66
Joined: Sat Feb 28, 2009 3:27 pm

How to install multiple MSIs from a web site?

Post by jeff00seattle »

Hi

I am creating a web site whereby a user can select multiple software products, and each is a MSI (Microsoft Install) file which is used by Windows Installer for installing anything (SDKs, DLLs, EXEs, etc...)

I can install one MSI well using:

Code: Select all

header("Location: {$msiFileName}"); exit;
I am not sure how I can multiple MSIs from a web site.

Ideas?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to install multiple MSIs from a web site?

Post by requinix »

You can't. It's only one file at a time.

And that code doesn't install anything. It just gets the browser to find the file: whether it runs it or just saves it isn't under your control.
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: How to install multiple MSIs from a web site?

Post by omniuni »

What you probably would want to do is figure out how to make an MSI with all the required components. Get a VPS or dedicated server, and use PHP's exec() function to execute a command line that will create a custom MSI with the components that a user selects. Stamp it with an MD5, and provide that MSI to the user. You could also create a self-extracting executable that contains a .bat with a list of the included .msi files. The auto-extracting .exe would extract the .msi's, execute the .bat, which would trigger each MSI to install as the last one finishes, and then exit and clean itself up.
Post Reply