Ok well first of all, you're scratching yourself on the head with your left foot. If you want the value of $HOSTNAME, use unit SysUtils and GetEnvironmentVariable('HOSTNAME'); Ales