I would follow Jens Suggestion to utilize WMI for that kind of tasks,

Anyway, to set the string manipulation right :



if open(1,"c:\test\msinfo.txt") = 0
   while @error = 0
       $x = readline(1)
       if instr($x,"Total physical memory")
           $mem = substr($x,22,12)
           ? $mem
       endif
   loop
   $ = close(1)
endif




[Wink]
_________________________