you CAN - i've done it - but it's poorly documented - our msicreator has probably taken a couple of man-years to get to its current state
MSI Database sdk[
^]
Some direction :)
1. understand WHAT an MSI is - a bunch of tables (accessed thru sql'ish commands) and some compressed file streams - it uses the OTHER apostrophe (`) for column names
2. the summaryStream is very important to get right
3. use orca (in the sdk) to debug/examine MSIs with (the ICE tests are invaluable)
4. DO NOT EVEN ATTEMPT to build one from a standing start - have a 'template' MSI and add things to that
5. at the very least you need to understand Component, File, Feature, Property and the Execution tables
6. understand what the ProductCode does - you probably want a new one for each MSI you build
strategy
1. Copy your template MSI (ISTR there's one in the MSI SDK)
2. Set your properties into the Property Tables (ProductName, ProductVersion, ProductCode, ProductLang etc)
3. Add your features, your components to those features, and files to those components, taking care to get the directory table right (this is all done with sql)
4. (optionally) insert your file data into the MSI streams - you CAN simply point to SxS files, I use CAB'd content, which mandates learning the the FCI C++ (cab) interface
5. Sort out the summary stream
6. lots of testing
or look at
WiX[
^] - build a WiX xml file and shell out to that at runtime
if i had to do it again, i'd use WiX - it didn't exist when we started