I have an executable installer that sets up a generic configuration file that must be modified before the software will work. I'm trying to streamline the install process and would like to wrap both the executable and my modified configuration file into a single msi installer. I have succeeded but am having trouble assigning the Before= or After= property value inside my InstallExecuteSequence element for the CustomAction that launches the executable installer. If I assign the executable installer to run too early, it doesn't run at all or exhibits strange behavior. And if I assign the executable installer to run too late in the install sequence, it overwrites my modified configuration file with the generic settings. What Before or After property assignment will allow the executable to run properly but not overwrite the file I move with the CopyFile element?
<Property Id="CONFIGFOLDER" Value="C:\acme\config" />
<Feature Id="ConfigurationFile" Title="Configuration File" Level="1">
<ComponentRef Id="CMP_ACME_Config_File" />
</Feature>
<DirectoryRef Id="TARGETDIR">
<Component Id="CMP_ACME_Config_File" Guid="">
<File Id="ACME_Config" Source="MySettings.conf" KeyPath="yes">
<CopyFile Id="Copy_ACME_Config"
DestinationProperty="CONFIGFOLDER"
DestinationName="settings.conf" />
</File>
</Component>
</DirectoryRef>
<Binary
Id="InstallerEXE"
SourceFile="installer.exe" />
<CustomAction
Id="Launch_Installer"
BinaryKey="InstallerEXE"
Impersonate="yes"
Execute="deferred"
ExeCommand=""
Return="check" />
<InstallExecuteSequence>
<Custom Action="Launch_Installer"
Before="InstallFiles">NOT Installed
</Custom>
</InstallExecuteSequence>