I am using WiX to install a plugin for a software that I am not controlling. To install the plugin, I have to put the target folder in a registry key:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="LocalAppDataFolder">
<Directory Id="APPROOTFOLDER" Name="Foobar Plugin" />
</Directory>
</Directory>
...
<DirectoryRef Id="APPROOTFOLDER">
<Component Id="register" Guid="240C21CC-D53B-45A7-94BD-6833CF1568BE">
<RegistryKey Root="HKCU" Key="Software\ACME\Plugins\FooBar">
<RegistryValue Name="InstallDir" Value="[APPROOTFOLDER]" Type="string"/>
</RegistryKey>
</RegistryKey>
</DirectoryRef>
After the installation, the registry key HKCU\Software\ACME\Plugins\FooBar\InstallDir will contain the installation target path, but with a trailing "\". Unfortunately, for some strange reasons, the host application (the provides the plugin architecture) crashes due to that. If there is no trailing slash, everything works fine!
Is there a way in WiX to get rid of the trailing slash?
One solution I was thinking of is simply adding a "." at the end of the path, however, this seems not to work in my scenario :( ..