Reputation: 417
I have developed a Modulebase Software
that is splitt up in two parts.
The first part is Service(BaseSoftware)
and the part are some Modules
that can be add to this Service.
State Now:
I already have created a Wix Setup for the Service(BaseSoftware). But now I need to install the modules. Each Module should have an own MSI-Setup.
Problem:
Before I can install a module the BaseSoftware has to be installed.
Solution:
I thought I could have custom action in the Modules Setup that asks the System if the BaseSoftware is already installed. If not just start the Setup for the BaseSoftware, and then continue with the modules Setup.
But I don't really know what is the best practice.
Upvotes: 0
Views: 34
Reputation: 691
In your Service installer, write a registry value that indicates your service is installed - here is an example that writes the install directory to the registry (you should customize the key)
<Component Id="ServiceRegistryKeys" Directory="InstallLocation" Permanent='yes'>
<RegistryKey Root="HKLM" Key="SOFTWARE\My Company\My Service">
<RegistryValue Type="string" Name="InstallPath" Value="[INSTALLDIR]" KeyPath="yes" />
</RegistryKey>
</Component>
In the module installers, you can check for that key, and fail if not present:
<!-- Require Service to be installed already -->
<Property Id="SERVICEPATH">
<RegistrySearch Id="ServicePath" Root="HKLM" Key="SOFTWARE\My Company\My Service" Name="InstallPath" Type="raw" />
</Property>
<Condition Message='The Service is not installed. Please install the Service first, and then this module.'><![CDATA[Installed OR (SERVICEPATH <> "")]]></Condition>
Make sure you use the same registry key
Upvotes: 2