Update on the problem. After much troubleshooting, and screaming at everyone (just kidding), I have unearthed the dear sweet problem
I have put a sleep for 120 in the script and it works perfectly. Aargh - It is obviously running the entire startup script too quickly and hasn't loaded the information for @domain yet.

What can I do to get the startup script to wait for the @domain info to be loaded prior to execution of the script
I have added this to the script, but it does not seem to work, so for the moment I am going to have to use the sleep for 60 seconds option to force the script to wait.

 Code:
? "Domain name is " @Domain
while
@Domain = ""
sleep 0.3
? "sleeping for 300 milliseconds"
loop

Hope this helps somebody ele