I'm creating a plugin for Adobe Illustrator and I'm attempting to make an installer for it using WiX. So in order to get the plugin to install in the correct location I am reading the registry to find the most up to date version of illustrator and then find the file path to that Illustrator exe. This all works fine and gives me "C:\Program Files\Adobe\Illustrator CC 2018\Support Files\Contents\Windows\Illustrator.exe"
(I've checked and if you choose to install it elsewhere this path reflects that). Plugins are installed in "C:\Program Files\Adobe\Illustrator CC 2018\Plug-ins"
.
So what I'm now trying to do is using the path to the exe get a relative path to the Plug-ins folder. Is there an easy way to do this in WiX?
I've tried to use
<CustomAction Id="SETDIRECTORY" Property="PLUGINFOLDER" Value="[ILLUSTRATOREXEPATH]..\..\..\Plug-ins" />
but this throws an error saying that .. is an invalid character
EDIT:
I've know managed to work out how to get the directory of the file by using the RegistrySearch Type "file", giving me "C:\Program Files\Adobe\Illustrator CC 2018\Support Files\Contents\Windows\"
but can't work out how to get the parent directory without using a script (something I don't want to have to resort to as it can apparently cause issues with anti virus).