I am creating a .msi installer using WiX Toolset which will:- 1. Install mongo db on client machine by running its mongodb-win32-x86_64-2008plus-ssl-3.4.4-signed.msi 2. Make directories for \data\db and \log and config file 3. Start mongo service as a Window service.
I am new to Wix. I was able to set it up and create a installer which is packaging mongo setup msi and config file to Wix installer. But it is just copying these files to install flocation. I want all the above steps to performed by WiX installer. Below are important section:-
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='EMERSONMONGO' Name="$(var.rootFolder)">
<Directory Id='PFWMONGOFOLDER' Name='$(var.subRootFolder)'>
<Directory Id='MONGO' Name='$(var.installFolder)'>
<Component Id="mongodb.msi" Guid="99B82660-F66B-4012-B742-D875623B1C16">
<File Id="mongodb.msi" Source="$(var.mongoSourceDir)\mongodb-win32-x86_64-2008plus-ssl-3.4.4-signed.msi" KeyPath="yes" Checksum="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Title='PFWMongo Installer' Description='PFWMongo Installer' Level='1'>
<ComponentRef Id="mongodb.msi" />
</Feature>
<CustomAction Id="RunMongoMsi" Return="ignore" Execute="deferred"
FileKey="mongodb.msi" ExeCommand=""
HideTarget="no" Impersonate="no" />
<InstallExecuteSequence>
<Custom Action='RunMongoMsi' Before='InstallFinalize'/>
<RemoveExistingProducts After="InstallInitialize" >
UNINSTALLPREVVERSIONS
</RemoveExistingProducts>
<Custom Action="NewerVersion" After="FindRelatedProducts">NEWERVERSIONDETECTED</Custom>
</InstallExecuteSequence>
Any help is much appreciated.