I'm not sure -- I added the following line to the NETAction user sample (Samples\User Actions\NETAction):
Code:
builder.LogMessage(builder.App.ExpandMacrosAndScript("%VISBUILDDIR%"));
and it logged
C:\Program Files\VisBuildPro9
when built.
Does it work for you?