# iAdmin Setup Project
This directory contains the Inno Setup script for building a setup package for [iAdmin (FEMA)](https://github.com/Greenfield-Investments/iAdmin). It also includes a PowerShell script to configure IIS features and roles and a new IIS site for the deployed application ([IIS_Config.ps1](IIS_Config.ps1)), which relies on a deployment configuration template file to determine which IIS features and roles should be installed ([DeploymentConfigTemplate.xml](DeploymentConfigTemplate.xml)).

## Configuration Variables
During installation using the compiled setup package for iAdmin, the user is prompted for values for the following configuration variables:

1. Database connection string: server name, initial catalog, username, and password.
2. iWS5 API URL.
3. IIS site name and host name.

The database connection string and iWS5 API URL are used to update the `web.config` file after installation has completed, and the IIS site and host names are passed to the PowerShell script to create the new IIS site.

## Dependencies
The minimal set of IIS features and roles required to run iAdmin are defined in [DeploymentConfigTemplate.xml](DeploymentConfigTemplate.xml). When the setup process is complete, IIS will be configured and any features/roles which are not already installed on the target machine will be installed. This process can take a while, depending on the target machine.

No additional dependencies are required to host iAdmin.

## Additional Notes
1. When building the iAdmin setup package, the `PublishPath` pre-processor variable in the Inno Setup script ([iAdmin_Setup.iss](iAdmin_Setup.iss)) should be set to the `PrecompiledWeb` directory created after publishing the site from Visual Studio.
2. When building the iAdmin setup package, the `MyAppVersion` pre-processor variable will be set by the output of the [Generate_Version.ps1](Generate_Version.ps1) PowerShell script which reads the Git repository info in the `PublishPath` directory to create a version string.