I am making an installer with a WiX 3.5 toolkit and I am facing a problem:
The installer should be able to determine if another program is present, and if so, add the DLL file to your directory. I use the following code to find out where the second program is installed:
<Property Id="FIND_INSTALLDIR" Value="[%ProgramFilesFolder]\PROGRAM">
<RegistrySearch
Id="INSTALLDIRSearch"
Root="HKLM"
Name="UninstallString"
Type="file"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PROGRAM"
/>
</Property>
The problem is that if the second program is not installed, the Windows installer gives me an error:
Could not access network location [%ProgramFilesFolder]\PROGRAM
I need to be able to handle this gracefully, though ... how can I recover from an error?
source
share