System Info

By FordLawnmower on Dec 27, 2009

This is a System Information script that uses Windows Management Instrumentation instead of a .dll. The script is pretty straight forward, just load and click channel or status to use.

Under System Info, you will see Public & Private. Public will display your system info to the current channel. Private will echo your system info back to the active screen. All will display everything and the other menu selections should be exactly what they say.

Example Output:
19:35:53 System Info CPU GenuineIntel Pentium(R) Dual-Core CPU E2210 @ 2.20GHz x64 Family 6 Model 23 Stepping 6 16% Load OS Microsoft Windows 7 Home Premium 6.1.7600 32-bit Uptime 2wks 4days 8hrs 35mins 40secs Total Memory 2815.24MB Available Memory 951.02MB Video NVIDIA GeForce 7050 / nForce 620i 256MB 1366x768 32bit 59Hz MOBO eMachines Base Board Audio Realtek High Definition Audio
19:36:07 System Info Network Realtek RTL8101E Family PCI-E Fast Ethernet NIC NDIS 6.0/802.11 USB Wireless LAN Card Bandwidth 1825KBps Received 55.89GB Sent 121.94GB Total 177.83GB ID FreeAgent Drive L:\ Type fixed Size 1.36TB Free 1.09TB ID K:\ Type fixed Size 279GB Free 129GB ID OS C:\ Type fixed Size 285GB Free 183GB ID New Volume B:\ Type fixed Size 931GB Free 101GB Total Disk Space 2.83TB Total Space Free 1.5TB

;System Info by Ford_Lawnmower #USA-Chat
menu channel,status {
  System Info
  .$iif(!$chan,$style(2)) Public
  ..All: allinfo say
  ..OS-Memory: say $osinfo  
  ..MotherBoard-CPU: say $cpuinfo $moboinfo
  ..Network: say $netinfo
  ..Video: say $videoinfo
  ..Disk Drives: say $diskinfo
  ..All: allinfo echo
  ..OS-Memory: echo -a $osinfo
  ..MotherBoard-CPU: echo -a $cpuinfo $moboinfo
  ..Network: echo -a $netinfo
  ..Video: echo -a $videoinfo
  ..Disk Drives: echo -a $diskinfo
alias -l allinfo {
  $1- 04S14ystem 04I14nfo: $cpuinfo  $osinfo $videoinfo $moboinfo
  $1- 04S14ystem 04I14nfo: $netinfo $diskinfo
alias -l cpuinfo {
  .comopen Processor WbemScripting.SWbemLocator
  if (!$comerr) {
    if ($com(Processor, ConnectServer, 3, dispatch* Specs)) {
      if ($com(Specs, Get, 3, string, Win32_Processor.DeviceID='CPU0', dispatch* Results)) {
        var %manufacturer, %name, %caption, %clockspeed, %load, %architecture
        if ($com(Results, Manufacturer, 3)) { %manufacturer = $com(Results).result }
        if ($com(Results, Name, 3)) { %name = $com(Results).result }
        if ($com(Results, Caption, 3)) { %caption = $com(Results).result }
        if ($com(Results, CurrentClockSpeed, 3)) { %clockspeed = $com(Results).result }
        if ($com(Results, LoadPercentage, 3)) { %load = $com(Results).result }
        if ($com(Results, Architecture, 3)) { %architecture = $com(Results).result }
        .comclose Results
      .comclose Specs
    .comclose Processor
    $iif($isid,return,$iif(# ischan,say,echo -a)) 04C14PU:04 %manufacturer %name  %caption $+(%load,%) Load
  else { echo -st Com Error $nopath($script) | .comclose Processor | return }
alias -l osinfo {
  if (!$com(Wbem.2)) { WbemOpen }
  var %TotalMemory 04T14otal 04M14emory:04 $round($calc($WbemGet(Win32_OperatingSystem,TotalVisibleMemorySize,1)/1024),2)
  var %FreeMemory 04A14vailable 04M14emory:04 $round($calc($WbemGet(Win32_OperatingSystem,FreePhysicalMemory,1)/1024),2)
  var %OSCaption 04O14S:04 $WbemGet(Win32_OperatingSystem,Caption,1)
  var %OSVersion $WbemGet(Win32_OperatingSystem,Version,1)
  var %OSArchitecture $WbemGet(Win32_OperatingSystem,OSArchitecture,1)
  if ($com(Wbem.2)) { .comclose Wbem.2 }
  $iif($isid,return,$iif(# ischan,say,echo -a)) %OSCaption %OSVersion %OSArchitecture 04U14ptime:04 $uptime(system,1) $+(%TotalMemory,MB) $+(%FreeMemory,MB)
alias -l moboinfo {
  if (!$com(Wbem.2)) { WbemOpen }
  var %Aname 04A14udio:04 $WbemGet(Win32_SoundDevice,Name,1)  
  var %Description $WbemGet(Win32_BaseBoard,Description,1)
  var %Manufacturer $WbemGet(Win32_BaseBoard,Manufacturer,1)
  if ($com(Wbem.2)) { .comclose Wbem.2 }
  $iif($isid,return,$iif(# ischan,say,echo -a)) 04M14OBO:04 %Manufacturer %Description %Aname 
alias -l netinfo {
  if (!$com(Wbem.2)) { WbemOpen }
  var %BytesReceived $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesReceivedPerSec,1)
  %BytesReceived = 04R14eceived:04 $bytes($calc(%BytesReceived + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesReceivedPerSec,2))).suf
  var %BytesSent $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesSentPerSec,1)
  %BytesSent = 04S14ent:04 $bytes($calc(%BytesSent + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesSentPerSec,2))).suf
  var %BytesTotal $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesTotalPerSec,1)
  %BytesTotal = 04T14otal:04 $bytes($calc(%BytesTotal + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,BytesTotalPerSec,2))).suf
  var %Bandwidth $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,CurrentBandwidth,1)
  %Bandwidth = 04B14andwidth:04 $calc(%Bandwidth + $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,CurrentBandwidth,2)/100000)
  var %Name $WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,Name,1)
  %Name = $+(%Name,14/04,$WbemGet(Win32_PerfRawData_Tcpip_NetworkInterface,Name,2))
  if ($com(Wbem.2)) { .comclose Wbem.2 }
  $iif($isid,return,$iif(# ischan,say,echo -a)) 04N14etwork:04 %Name $+(%Bandwidth,KBps) %BytesReceived %BytesSent %BytesTotal 
alias -l videoinfo {
  if (!$com(Wbem.2)) { WbemOpen }
  var %Compatibility $WbemGet(Win32_VideoController,AdapterCompatibility,1)
  var %VideoProcessor $WbemGet(Win32_VideoController,VideoProcessor,1)
  var %AdapterRam $WbemGet(Win32_VideoController,AdapterRam,1)
  var %Horizontal $WbemGet(Win32_VideoController,currenthorizontalresolution,1)
  var %Vertical $WbemGet(Win32_VideoController,currentverticalresolution,1)
  var %Bits $WbemGet(Win32_VideoController,currentbitsperpixel,1)
  var %Refresh $WbemGet(Win32_VideoController,currentrefreshrate,1)
  if ($com(Wbem.2)) { .comclose Wbem.2 }  
  $iif($isid,return,$iif(# ischan,say,echo -a)) 04V14ideo:04 %Compatibility %VideoProcessor $+($bytes(%AdapterRam,3),MB) $+(%Horizontal,x,%Vertical) $+(%Bits,bit) $+(%Refresh,Hz)
alias -l DiskInfo {
  var %d $disk(0),%total 0,%free 0,%result
  while (%d) {
    if ($disk(%d).size) {
      %total = $calc(%total + $disk(%d).size)
      %free = $calc(%free + $disk(%d).free)
      %result = %result 04I14D:04 $disk(%d).label $disk(%d).path 04T14ype:04 $disk(%d).type 04S14ize:04 $bytes($disk(%d).size,g3).suf 04F14ree:04 $bytes($disk(%d).free,g3).suf 
    dec %d 
  $iif($isid,return,$iif(# ischan,say,echo -a)) %Result 04T14otal 04D14isk 04S14pace:04 $bytes(%Total,g3).suf 04T14otal 04S14pace 04F14ree:04 $bytes(%free,g3).suf 
alias -l WbemOpen {
  .comopen Wbem.1 WbemScripting.SWbemLocator
  .comclose Wbem.1 $com(Wbem.1,ConnectServer,3,dispatch* Wbem.2)
alias -l WbemGet {
  if ($com(Wbem.3)) { .comclose Wbem.3 }
  if ($com(Wbem.2,ExecQuery,3,bstr*,select $2 from $1,dispatch* Wbem.3)) { var %Result $comval(Wbem.3,$3,$2) }
  .comclose Wbem.3 
  return %Result


Sign in to comment.
ovelayer   -  Mar 05, 2015

hey ford is there a way to update this script so it can show system information of a linux system?
would be awsome!!

NickLeStrange   -  Nov 07, 2013

Thanks! Works a treat on Win 8.1. I just stripped out the colour, black is the new red. ;)

DragonHeart   -  Aug 12, 2013

Ford, great script. Got it working on my bot but curious, anyway to make EACH HDD ID on its own line?

rogue1   -  Dec 22, 2012

Any reason why when I go to show bandwith it does not show actual speed but 1000000001? Is there a fix for it?

DragonHeart   -  Nov 24, 2012

Ford, how hard would it be to make this as a bot response?

LuminolBlue   -  Jan 02, 2012

Excellent script, works great! :D

chachin   -  May 01, 2011

it still works 10/10 :D

Sharky_Dude   -  Apr 29, 2011

All you have to to is go into the snippet and find the color symbols and delete the numbers after them.

chachin   -  Apr 29, 2011

Why does it have to be freaking RED... most servers like. efnet/freenode dont like colors and you/me can get kicked for it :|

Sharky_Dude   -  Apr 06, 2011

It works grate... mostly. It says I'm using a P II when I'm using a celeron. :/ I'm pretty sure because I built my pc myself lol.

Grant-   -  Sep 01, 2010

Impressive :D
I only see one thing wrong with it...

Bandwidth: 9223372036854777900KBps

SimplicityX   -  Aug 31, 2010

Nice, FordLawnmower. I looked through your snippets -- so far they all seem pretty cool.

FordLawnmower   -  Aug 30, 2010

Thanks DarkGamer120 :)

DarkGamer120   -  Aug 29, 2010

Awesum! :D


FordLawnmower   -  Jul 14, 2010

Your Welcome expwOrm :)

expwOrm   -  Jul 14, 2010

Very very nice and fast! Its incredible.. all others dont work cuz i hace 3GB of ram and all other say i have 2gb ¬_¬
Thank's a lot

FordLawnmower   -  Mar 15, 2010

Thanks rsb :)

rsb   -  Mar 15, 2010

Thats pretttty slick

SnoooP   -  Jan 02, 2010

Really nice, =) works perfect.. keep up the good work.

Silo   -  Dec 31, 2009

If you right click in the status or a channel window the options to use it will be available.

If the allinfo alias wasn't local (-l) you could type //allinfo to get the info.

ChiefDean   -  Dec 31, 2009

how do you run it? what do i type to use it?

Master-Of-Death   -  Dec 28, 2009

10/10, another gr8 script.

water_dragon   -  Dec 28, 2009

thanks! i do like this exspecialy with no dll to work it :)

Silo   -  Dec 28, 2009

Very nice. Gave you a 10 for that one. You've also given me some tips and ideas now too, so thanks : )

FordLawnmower   -  Dec 27, 2009

Thanks gooshie :) Thanks jasonh :)
I'm not anti-dll or anything, but there is a way to do something with mSL, I see no reason to use a dll.

jasonh   -  Dec 27, 2009

works great, no crappy .dll to do the work for it

gooshie   -  Dec 27, 2009

No dll I like it..

FordLawnmower   -  Dec 27, 2009

Thank You Aucun50 :)

Aucun50   -  Dec 27, 2009

Very nice and very fast :) It's shorter then the moo script out there and i would say it's better made but that's just me.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.