I am writing my own bootstrapper for MSI.
I work for a small startup company and our resources are very limited at this point, so I cannot afford IS just yet.
But I want to be able to create self-extracting setups to be downloaded from the web. This is a topic that has been discussed on these forums but I've seen no real solutions.
Here is my basic architecture for creating a dependency free self-extracting download:
1) My bootstrapper is written in C++ and it uses only core APIs - no MFC, so there should be no problem with initial dependencies.
2) There is no requirement for Winzip, etc.
Instead, what I am doing is I create a resource file that contains:
InstMSIA.exe
InstMSIW.exe
My application msi package.
3) The bootstrapper is compiled with the resource so everything comes in a single "Setup.exe" file.
When the "Setup.exe" is run, the following actions are performed:
1) Display a simple form created from API calls only (no MFC) that will display simple bootstrapping actions.
2) Check OS using APIs.
3) Load the resource corresponding to the appropriate InstMSI executable, and then save it to the target machine.
4) Load the resource corresponding to the application msi and save it to the target machine.
5) Launch the InstMSI exe using CreateProcess and wait for it to terminate.
6) Launch the application msi using CreateProcess and then terminate the bootstrapping Setup.exe immediately, allowing the msi to continue running.
After that, the msi runs in the usual fashion.
Comments? Critiques? I think it is a pretty cool approach, and I welcome any input.
Now, for questions:
I have read the Microsoft docs extensively, and there is just not much info on bootstrapping, etc. So my questions are:
1) Does anyone know if the InstMSI.exe return any sort of useful exit codes?
2) One concern I have is that there does not seem to be any obvious way to repair a Windows Installer install itself. If files are missing or corrupt, as far as I can tell the InstMSI.exe will still just return a message that says "Service already installed" and do nothing. Does anyone have any info on repairing the Windows Installer itself, or how to manually install the files which can be extracted from the exe file?
Thanks
Robert
PS: If there is an interest, I will make the code available when it is finished ...
Edited by rgraham, 23 January 2005 - 10:52.