|
Hi guys, I'm trying to gather some hardware information. I can get Kix to get everything other than system memory. I saw that there is another script that contains a memory.exe for this but would prefer to use tools installed by default on 2k/xp systems. I thought that maybe I could run the msinfo32 and print it into a file but am having some problems getting the information out of the file. I'm not a programmer by any means and am relativley new to kix. Here is the code I have so far...
,-------start break on
;-------Operating System
? @producttype
;-------CPU Speed and type
$cpu = readvalue ("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0","processornamestring")
? $cpu
;-------Report the free Disk space if the drive exists
$drivec = getdiskspace( "c:\") $drived = getdiskspace( "d:\") $drivee = getdiskspace( "e:\") $drivef = getdiskspace( "f:\")
If $drivec>0 ? $drivec endif If $drived>0 ? $drived endif If $drivee>0 ? $drivee endif If $drivef>0 ? $drivef endif
;-------IP Address
? @IPADDRESS0
;-------System Memory
shell "C:\Program Files\Common Files\Microsoft shared\MSInfo\msinfo32.exe /report c:\test\msinfo.txt /categories applications"
If Open(1,"c:\test\msinfo.txt") = 0 WHILE @ERROR = 0 $x = ReadLine(1) IF LEFT($x,21)= "Total physical memory" left($mem,10) ? $mem
close (1) ENDIF
If you guys could help I would appreciate it.
Tnx
|