Well, I found one... but it echoed everything and I only needed the CPU information, so I just put everything into vars because it didn't want to work if I removed them. So... here's what I have... is there a better way?
alias cpu {
.comopen Locator WbemScripting.SWbemLocator
if ($comerr) { echo -a Error getting CPU info. | halt }
var %com = $com(Locator, ConnectServer, 3, dispatch* Services)
var %result = $com(Locator).result
var %com(0) = $com(0)
if ($com(Services)) {
var %com = $com(Services, Get, 3, string, Win32_Processor.DeviceID='CPU0', dispatch* More)
var %result = $com(Services).result
var %com(0) = $com(0)
if ($com(More)) {
var %com = $com(More, Name, 3)
var %cpu = $com(More).result
.comclose More
}
.comclose Services
}
.comclose Locator
echo -a %cpu
}
Btw, I need it to work for all OS's (or at least 98+).
EDIT:
Here's another I found and modified. It seems to be much faster.
alias sys.info {
if ($1 == Os) { return $read.sys.info(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName)) $iif($read.sys.info(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber),Build $v1) $+ $chr(44) $read.sys.info(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDVersion) }
if ($1 == cpu) { return $read.sys.info(HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0\ProcessorNameString) }
}
alias read.sys.info {
var %com = $rand(a,z) $+ $ctime $+ $ticks $+ $ctime $+ $time $+ $rand(1,9999999999) | .comopen %com wscript.Shell
if (!$comerr) { var %read_info = $com(%com,RegRead,3,bstr,$1-), %res = $com(%com).result }
if (%res) { return $ifmatch }
.comclose %com
}
If anyone can give me something similar that will work on any OS (or 98+) and is fast, I'd appreciate it. I don't really want to use a piece of someone else's script if someone is willing to make just the part I need because I can't easily give credit when this gets built into Invision.
Thanks.