System Info

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
PT
Senior Member
Posts: 147
Joined: Wed Apr 13, 2005 12:32 pm
Location: Hampshire.UK

System Info

Post by PT »

Scott

Are there any plugins/devices for getting windows information displayed in a software remote.ie disk drive space,free memory etc.or even uptime of Housebot server?
Regards

PT

If it isn't broke,fix it till it is!
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

None that I know of, but it would be really really easy to write one. Maybe I'll play with it this evening. No promises. :wink:
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Scott, don't play with this because I just finished it.

It displays Disk drive info, Memory, PC and HB uptimes and even IP and hostname info in a single log view.

I will e-mail it to you because I really don't know how to attach in this forum. Hope it makes sense and maybe you could make it more general so others can use it.



Richard
TakeFlight
Member
Posts: 53
Joined: Wed Feb 01, 2006 11:48 pm
Location: Philly burbs

Post by TakeFlight »

This is great!
spike5884
Senior Member
Posts: 129
Joined: Thu Aug 26, 2004 8:08 am
Location: WI

Post by spike5884 »

You can put attachments in the Extensions forum. That is where I have posted stuff that I have done in the past.
Thanks,
Scott J
aka spike5884
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I am working with Scott to come up with a general solution that excludes my own specifics and leaves the general most important stuff. Hopefully very soon Scott will be able to post a complete export of the script and properties.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

The Windows Info script is about to be released.



I also wrote an EMail module (vbscript). It runs on a (two) minute timer and checks up to 4 different pop3 accounts. Info about the sender, subject, attachments etc is displayed in an alpha list view. An email can be selected in this list view and the content of the email can then be displayed in another alpha list view. The module does not delete the emails on the server although it is very easy to set this differently and emails can be deleted by selecting them in the list view and pressing the Delete button. If a NEW email is received, a popup panel is displayed for a certain amount of seconds. An extra popup panel is used to set all of the account info such as: account name, server name, user name and a scrambled password. The amount of popup seconds can be set there as well. This script is dependant on a third party freeware dll which provides the pop3 objects that are called for from the script.



If anybody is interested, please let me know and I can see if I can make this script more generic and create an export for it. It contains many different properties for all of the account info.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Richard PC Info script

Post by ScottBot »

I've packaged Richards PC Info script into a HouseBot export file that you can simply drag and drop onto HouseBot (and then restart) to use.



This import will

(1)Create a Device (PC Info) and associated VB Script.

(2) Create a Sleep Timer Device and Task to periodically to execute the script. You can adjust the rate at which the PC Info Device will run by setting the timer value.

(3) Create a Startup task to set the HouseBot startup time.



Since the Device is done with VBScript it should be fairly easy for others to add their specific system info needs to the script/Device.



If you want to display the Log PC Info property of the PC Info device in a Theme, using a List control will display the format better, since the data is tab formatted.



Thanks Richard for your contribution!
Attachments
pc_info.hbx
(2.58 KiB) Downloaded 524 times
Last edited by ScottBot on Thu Jul 06, 2006 12:01 pm, edited 4 times in total.
Scott
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Minor change to the script. The Script Device to set the startup time isn't needed, since it can be done more simply right from the Startup script (Thanks to Richard for pointing out what you think I would have known :oops: )



FYI: Also, it creates a startuP Task now. Notice the upper case P. In HouseBot you can have multiple startup tasks by using different case combinations of the name STARTUP.



I've updated the attachment in the previous message with the new export. If you don't see the attachment, make sure you are logged in to the forum.
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

FYI - the task that gets created is named staruP but it should be startuP (the second "t" is missing). Also it appears there should be another task to periodically run the "PC Info" script so that the date is kept up-to-date.



Also on my system the host name and IP address didn't get populated. I'm going to do some more testing and I'll pass on whatever I find.



-- Dave
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

The reason that my IP address didn't get populated is because as written the script only updates the IP address and host name fields every 10 minutes "on the fives". This means that even if you run this task on startup the value will only be populated if the time is "right".



Also the IP address being shown is our public firewall address instead of my DHCP client address (I'm testing this at work over lunch) and the host name is still not being populated. I'm going to do a bit more research on the network code and see what I can come up with. Other than these minor issues though this is a really nice script. Thanks Richard/Scott!



-- Dave
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Dave,



I set this IP update rate each time the script ran, but then after some hours I got an error. Then I went to the IP site and it said that my daily 300 times had expired. So running this script every minute gets me about 5 hours of IP info. I had to get this rate down a bit and introduced the 10 minute timer. There are lots of other ways to come about this. Also that 10 minute timer is the reason why i have to populate a separate IP and host name property to overcome the other 9 minutes. Hopefully others now come up with more additional stuff to make it even better...
PT
Senior Member
Posts: 147
Joined: Wed Apr 13, 2005 12:32 pm
Location: Hampshire.UK

Post by PT »

Dave



If you want to see the ip address of your local system. Then you can use part of the following script. I have been playing with these wmi scripts and missed something very obvious which Richard helped me with to get it into Housebot. You can query most of win32 items with these type of scripts.



Obviously change the Set Device property to whatever you need. I have left the others in if anyone wants to see the type of info available.

By the way Bob is on my test machine easy device name!



' IP Address

Dim strComputer, CRLF

Dim colDrives, strMsg

Dim WSHNetwork



strComputer = "."

CRLF = Chr(13) & Chr(10)



Set objWMIService = GetObject ("winmgmts:" & "!\\" & strComputer & "\root\cimv2")

Set colAdapters = objWMIService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True")





For Each objAdapter in colAdapters

A=strdsk&"Host name: " & "=" & objAdapter.DNSHostName & CRLF & _

"IP address: " & "=" & objAdapter.IPAddress(i) & CRLF & _

"Description: " & "=" & objAdapter.Description & CRLF & _

"Physical address: " & "=" & objAdapter.MACAddress & CRLF & _

"DHCP enabled: " & "=" & objAdapter.DHCPEnabled

Next



SetPropertyValue "bob.Listing",(a)

'------------

'Memory etc



Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" _

& strComputer & "\root\cimv2")

Set colComputer = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")



For Each objComputer in colComputer

intRamMB = int((objComputer.TotalPhysicalMemory) /1048576)+1

SetPropertyValue "bob.memory", "System Name: " & objComputer.Name & vbCr & "Total RAM: " & intRamMB & " Mb"

SetPropertyValue "bob.Loggedon",objComputer.UserName & " is/are logged on"

SetPropertyValue "bob.SystemType",objComputer.SystemType

Next

'

'

'-------------------

'Operating system

'

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _

("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems

SetPropertyValue "bob.list", objOperatingSystem.Caption & " " & _

objOperatingSystem.Version

Next

''----------------
Regards

PT

If it isn't broke,fix it till it is!
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

And the list goes on....



Just one small remark @PT. CRLF is already predefined. You can use vbCRLF for that, or just vbCR and vbLF or vbTAB. Many Chr(xx) values are already defined and make your script more readable.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

dlmorgan999 wrote:FYI - the task that gets created is named staruP but it should be startuP (the second "t" is missing).
Amazing what a difference a little 't' can have! Ok, I've updated the export once again with the correct Task name. Needless to say, I'm not testing this stuff very well, so hopefully it will work better. I've also added a Task and Sleep timer to execute it every hour. I also removed the limit in the VB Script so it will get the IP every time it runs (although I only have it set to run every hour).
Scott
Post Reply