# $(BDS) Needed in output but FB won't let me

**URL:** https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249
**Category:** Discussion
**Created:** [November 6, 2006, 10:09am UTC](https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249 "2006-11-06T10:09:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rlove](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/rlove/32/27_2.png) [@rlove](https://www.finalbuilder.com/forums/u/rlove)
#### Post date: [November 6, 2006, 10:09am UTC](https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249/1 "2006-11-06T10:09:18Z")

</div>

I am writing a procedure gets from Source Safe, Adds Missing Paths to Delphi Libary Path, Complies all the Packages, Installs them into the IDE (if needed)  
Using FB 5.0  
  
The Problem is that:  
  
FinalBuilder sees $(BDS) as a variable.  
  
So when reading the Delphi Libary Path from the Registry and Writing it back. It tells me that this variable is undefined.  
  
Attempting a work around of:  
Defining the variable BDS and settings its value to $(BDS)   
does not work…   
  
Any ideas on how to make this work?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [November 7, 2006, 3:29am UTC](https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249/2 "2006-11-07T03:29:33Z")

</div>

Hi Robert  
  
When writing the value back to the the registry, you will need to disable recursive variable expansion (which is what is causing the problem here). This article on our website explains more about this :  
  
[https://www.finalbuilder.com/articles.aspx?mid=370&ctl=ArticleView&articleId=10](https://www.finalbuilder.com/articles.aspx?mid=370&ctl=ArticleView&articleId=10)  
  
HTH

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [June 14, 2007, 2:34am UTC](https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249/3 "2007-06-14T02:34:34Z")

</div>

The referred article did not explain how to prevent expansion of $() (macros in Visual Studio project files f.ex)

When I attempt to set this string into a XML node:

call "$(ProjectDir)%fbXmlRelativePath%..\..\..\..\Production\Basis\AddProjectOutput" "$(ProjectPath)" "$(TargetFileName)"

&nbsp;

I get the message:

'Error Expanding Node text : Variable :&nbsp;ProjectDir - does not exits:

&nbsp;

This is the output I expected:

call "$(ProjectDir)..\..\..\..\..\..\..\Production\Basis\AddProjectOutput" "$(ProjectPath)" "$(TargetFileName)"

&nbsp;

I have tried $$(, $((, $($(, \$(, $\(, $(!, $!(,&nbsp;!$(,&nbsp;&nbsp;etc without any success.

Since the $() variable behaviour is not documented (FB5.5.0.240), do you have any&nbsp;suggestions?

&nbsp;

rm

&nbsp;

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [June 15, 2007, 2:32am UTC](https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249/4 "2007-06-15T02:32:09Z")

</div>

Hi Rune,   
  
 $$(Content) should expand at runtime to $(Content). When I tried this method on your example string, it expanded correctly.   
  
 There is a footnote about the $() syntax in the help file, but it is not widely documented. It’s a deprecated leftover from earlier versions of FB, and something which we would probably like to remove in a future release.   
  
 Regards,   
  
 Angus

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [June 15, 2007, 7:41am UTC](https://www.finalbuilder.com/forums/t/bds-needed-in-output-but-fb-wont-let-me/249/5 "2007-06-15T07:41:42Z")

</div>

Thanks for the prompt feedback, and even better it worked as you suggested with $$(). (thought I tried that one though)

However, I am not able to find that footnote about the $() in the help file so is my claim about the lacking documentation still standing?

rm
