PJ on Development
Thoughts and babbling about software development. Visual Basic, .NET platform, web, etc.
Title: | Infrastructure Setup |
Description: | A small setup bootstrap to verify and install pre-requisites for a .NET application. |
Author: | Paulo Santos |
eMail: | pjondevelopment@gmail.com |
Environment: | Visual C++ 2005 (Visual Studio 2005) |
Keywords: | Setup, Installation, Infrastructure, Prerequisites |
Infrastructure Setup
- Download source code - 34,07 KB
DISCLAIMERThe Software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. |
||
Introduction
This code is an old project of mine that was originally published at Planet Source Code, which in turn was an evolution of a even previous project from Kevin Moore (you can find Kevin's original project here).
This version has several enhancements, though.
I've enhanced the verification of the IE (which is configurable now), the MDAC, and the .NET platform versions, as well making possible to pass customized parameter to each one of the installers.
Compiling the code
To compile the code you only need the Visual Studio 2005. It was compiled using the default settings for the Visual C++.
Just remember to change your build settings to Release, otherwise it will only display the commands it would execute when the user click on the Install button.
Customizing
To customize this setup bootstrap you just need to modify the file settings.ini. Each and every key is described below.
The settings.ini file
There are two sections in the INI file:
[Bootstrap]
Gathers the information about the location of the installers for the infrastructure components, and;[WhatInstall]
Configures what is necessary to the current installation.
The Bootstrap section
This section may contain the following keys:
Key | Status | Description |
CaptionText | optional | The title of all the message box that will be displayed. defaults to "<ProductName> Setup" |
ErrorCaptionText | optional | The title of all the error message box that will be displayed. defaults to "<ProductName> Setup Error" |
FxInstallerName | optional | Name of the redistributable .NET setup defaults to "dotnetfx.exe" |
FxInstallerPath | optional | Relative path to "DOTNETFX.EXE" defaults to the SETUP.EXE path. |
FxInstallerParams | optional | Command line parameter to passed to the .NET installer. defaults to /q:a /c:"install /l /q" |
FxVersion | mandatory1 | Version of the .NET Framework required by the application. Requires the FULL version.
|
IEInstallerName | optional | The name of the IE installer defaults to "ie6setup.exe" |
IEInstallerPath | optional | Relative path to the IE installer. defaults to the SETUP.EXE path. |
IEInstallerParams | optional | Command line parameters passed to the IE installer. defaults to /passive |
IEVersion | mandatory1 | The minimal version of the IE required by the application. defaults to 6.0 |
MDACInstallerPath | optional | Relative path to the MDAC installer. defaults to the SETUP.EXE path. |
MDACInstallerParams | optional | Command line parameters passed to the MDAC installer. defaults to /q |
MDACVersion | mandatory1 | The minimal version of the MDAC required by the application. defaults to 2.7 |
MSDEInstallerPath | optional | Relative path to the MSDE installer defaults to the SETUP.EXE path. |
MSDEInstallerParams 2 | optional | Command line parameters passed to the MSDE installer. defaults to /setup.ini /SAPWD='password' |
MSIInstallerName | optional | The name of the Windows Installer installer. defaults to
|
MSIInstallerPath | optional | Relative path to the Windows Installer installer. defaults to the SETUP.EXE path. |
MSIInstallerParams | optional | Command line parameter passed to the Windows Installer installer defaults to /Q |
Package | mandatory | The MSI package to be installed, i.e. YOUR application installer. |
ProductName | optional | The name of your product. defaults to "Application" |
1 | The keys marked mandatory1 are mandatory only if the specified component is required by the application. See [WhatInstall] section below. |
2 | In the MSDEParams key you may specify the SA password in the command line, however, it will be stored as plain text in the "settings.ini" . This might raise some security issues within your application. Be aware of this. |
3 | The Windows Installer installers version 3.0 and 3.1 have non-standard names, you may use any name you want just setting this key, however it defaults to INSTMSI.EXE for Windows XP and up in order to provide a minimal standardization. |
The WhatInstall section
This section may contain the following keys:
Key | Value | Description |
.NETFramework | 1 or 0 | .NET Framework |
IE | 1 or 0 | Internet Explorer |
MDAC | 1 or 0 | Microsoft Data Access Component |
MSDE | 1 or 0 | Microsoft SQL Server Desktop Engine |
WindowsInstaller | 1 or 0 | A new version of the Windows Installer |
This section specifies which component is required by the application.