I am using WiX to create a custom installer. I want to navigate one directory up from the .msi's directory in order to find the path of an executable file. After doing some research, I found that [OriginalDatabase] points to the .msi's location, but I don't know how to search up from that location instead of down. Here is my search code:
<Property Id="SHORTCUT">
<DirectorySearch Path="..\[OriginalDatabase]"
Depth="0"
AssignToProperty="no"
Id="MainSearch" >
<FileSearch Name="Program.exe" Id="EXESearch" />
</DirectorySearch>
</Property>
WiX will not let me add the "..\" in front of a preset directory path. I don't know how else to navigate up from that folder. Any suggestions would be greatly appreciated!
Windows Installer has no such ability. You'd have to write a custom action to resolve OriginalDatabase and then work up to the parent from there.