What Les means is that this line:
Code:
SHELL '%comspec% /c NETDOM Join $Computer /domain:testing /userd:administrator /passwordd:* /userO:administrator /passwordO:*' 



Should look more like this:
Code:
SHELL '"'+%COMSPEC%+'" /c NETDOM Join '+$Computer+' /domain:testing /userd:administrator /passwordd:* /userO:administrator /passwordO:*' 



If you don't know why this is the case then check the manual for what SetOption() does. If you are still unsure after that then ask again, as it is an important point.