# IWS5.AdminApi Setup Project This directory contains the Inno Setup script for building a setup package for [IWS5.AdminApi](https://github.com/Greenfield-Investments/iWS5/tree/develop/IWS5.AdminApi). 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 IWS5.AdminApi, the user is prompted for values for the following configuration variables: 1. Active Directory connection string: server, port, subdomain, and domain. 2. Database connection string: server name, initial catalog, username, and password. 3. IIS site name and host name. The Active Directory and database connection strings are used to update the `appconfig.json` 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 IWS5.AdminApi 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. In addition to IIS, the following dependencies are required to host IWS5.AdminApi: 1. The [ASP.NET Core 8.0 Runtime - Windows Hosting Bundle](https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.21/dotnet-hosting-8.0.21-win.exe) must be installed for IIS to host ASP.NET Core APIs. This file should be located at `redist/dotnet-hosting-8.0.20-win.exe`. ## Additional Notes 1. When building the IWS5.AdminApi setup package, the `PublishPath` pre-processor variable in the Inno Setup script ([IWS5.AdminApi_Setup.iss](IWS5.AdminApi_Setup.iss)) should be set to the publish directory created after publishing the application from Visual Studio. 2. When building the IWS5.AdminApi setup package, the `MyAppVersion` pre-processor variable 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, combined with the compiled EXE's version string.