Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Using the MSI API


3 replies to this topic

Jim Bassett

Jim Bassett
  • Members
  • 22 posts

Posted 11 June 2004 - 16:43

We are fiarly new to using MSI and have many products that we offer our customers. One request we are getting from our customers is the option from either a web site or from the CDs that we send, of allowing the customer to select two or more products to install as a group rather than having to install each product one at a time. Each product does have a product code that must be inputted and of course that code would need to be imputted as part of the multi product selection before installation. Once the customer selected all of the products they desire we would like to :

1) Install the products, one after another with only one license screen that would apply to all of the selected products, and then a progress indictor as the UI until all of the products are installed.

2) The option for the customer to select multiple products for saving to their HD for installing later. For product security the product code would be used when the customer installed later.

This is simuliar to how one does MS updates from their download site other than the inputting of product codes and the option of saving each update to their HD.

I suspect that the MSI API is the tool to use for doing something like this but I haven't seen any examples that do something simiuliar and other than firing off an install using the MSI API I haven't seen any other examples.

Does anyone know how to do something like what I am describing, have suggerts, or know a source of examples for using the MSI API.

Thanks

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 12 June 2004 - 06:08

If you write your own CD launcher you can call MsiInstallProduct to install each windows installer setup in sequence. I would launch each install silently in sequence with the product key passed to each setup as a public property in the command line (the launcher GUI would build the command line). The setup itself should then write the key to the registry or wherever you store your key. You should validate the key in the launcher rather than the setup. Is this along the lines of what you want to do?
Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 12 June 2004 - 06:09

MsiInstallProduct info: http://msdn.microsof...application.asp
Regards
-Stein Åsmul

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 23 June 2004 - 03:20

Also, if you download the Microsoft SDK (includes the Windows Isntaller SDK), source code is included for a setup.exe (similar to install shields).