I wrote a test application to investigate the effects of setting Final output directory to a location outside of the project file directory tree on Application->ExeName and ParamStr(0).
What I have observed is as follows.
If the Final output directory is a relative path - default is .\$(Platform)\$(Config) - then this is appended to the project file path.
For my test project file: C:\Project\Suite\Project1\Project1.cbproj this will result in ExeName & ParamStr(0) = C:\Project\Suite\Project1\.\Win32\Debug\Project1.exe.
Again this is under the debugger. Selecting Run Without Debugging or run outside the IDE these will both have the correct value C:\Project\Suite\Project1\Win32\Debug\Project1.exe.
If I set the Final output directory to: ..\Target\$(Platform)\$(Config) to put the exe in following directory, C:\Project\Suite\Target\Win32\Debug the resulting value of ExeName & ParamStr(0) = C:\Project\Suite\Project1\.\..\Win32\Debug\Project1.exe which is clearly not helpful as the Project1.exe makes use of ExeName to determine the directory that the exe is in, and the related directories where various shared configuration and application specific files are kept.
Using GetCurrDir() on startup instead of ExeName is a possible workaround. I have tested this and it seems to work correctly irrespective of whether or not the program is run with debugging.
The reason to do this is that there are several dynamic and static libraries as well as executable programs in the suite - Project2, Project3, etc. Compiling the .dll and .exe files into a common location allows for a single location of shared application support files.
It is also possible to set an absolute path in the Final output directory. Doing so will cause the ExeName and ParamStr(0) value to be correct however when someone else loads the suite onto their computer they may not put it in exactly the same path. Currently the Suite can be placed anywhere and the developer can build all without having to change any path settings.
Update: Apart from the ExeName problem, debugging an exe that uses a .dll in this "external" directory can't happen because under the debugger with the faulty ExeName the executable can't find .dlls despite them being in that folder. Run Without Debugging also fails to find the .dll files. Running this .exe from outside IDE works. Setting the Working Directory to the Target .exe path (absolute) works. Using a relative doesn't work.
It would be good to know why the IDE behaves this way and whether this is something that could be improved or otherwise whether there is another way around this.