To be more specific I would like to read the \[code\]File\[/code\] element attribute \[code\]Source="$(var.WixSlave.TargetDir)\WixSlave.exe"\[/code\] and then transform it to just \[code\]WixSlaveexe\[/code\] i.e. extract from the source string only letters (a-z, A-Z), starting after last slash
And then assign that string to the \[code\]RegistryValue\[/code\] element \[code\]Name\[/code\] attribute, which in the sample is \[code\]Name="toBeVariableKey"\[/code\], but should become \[code\]Name="WixSlaveexe"\[/code\] for the first \[code\]Component\[/code\]
For the second \[code\]Component\[/code\] it should be reading from \[code\]File\[/code\] \[code\]Source="$(var.WixSlave.TargetDir)\WixSlave.exe.config"\[/code\] and adding \[code\]RegistryValue\[/code\] with \[code\]Name="WixSlaveexeconfig"\[/code\], and so on...