Please read in the KiXtart Manual under SETOPTION('NoVarsInStrings','ON').

You need to move the KiXtart variables to outside the quotes, e.g.
code:
? 'Memory = '+$memory
$wri=Writeprofilestring($file,@wksta, "C: Drive Size",$tot)

_________________________
There are two types of vessels, submarines and targets.