Jump to content
Sign in to follow this  
JSThePatriot

Computer Info UDF's

Recommended Posts

The Two OS's i have installed are Windows XP Pro and Windows XP MCE... I heard there really is no way to tell the difference between the two.. and recently i Installed Windows Vista x64 RC1... if you would like i could test what you have so far on Vista... although in the tests it would be nice to have an exit key built in so i dont have to run through the entirety of the more extensive udf's... I also have the ability to install a linux OS Ubuntu dristro x86 and x64.. i was wanting to run it from the live cd of ubuntu or bartPE to detect the installed OS's

I will add some exiting from the examples file... if I can figure it all out.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

I know Microsoft calls it QFE, but can you maybe make it _ComputerGetHotfixes or _ComputerGetPatches since that what it really queries?

*Edit* Great work! I definitely intend to use your code in some upcoming projects I have on my plate.

I thought about something like that, but there is also a Patches WMI call, I dont know about the HotFixes yet. Does QFE include all the Hotfixes and Patches?

Thanks,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

First things first. Decide which components you want to check to besure are there, or are the correct one's, and then let me know and I will point you to the proper UDF with an example.

JS

Great :">

I'm interested in checking network card, cpu and hard drives. An exemple for such a use would be perfect :"> .

Share this post


Link to post
Share on other sites

Great :">

I'm interested in checking network card, cpu and hard drives. An exemple for such a use would be perfect :"> .

Have you looked at my example file? It shows the exact examples for _ComputerGetNetworkCards, _ComputerGetProcessors, and _ComputerGetDrives.

Let me know if you need further help than is available in the examples.

Also may I suggest from your post count you are new to AutoIt, and/or scripting. A great place to start is Welcome to AutoIt 1-2-3. This should help you be able to better use my examples file.

Thanks for your interest in my UDF's.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Have you looked at my example file? It shows the exact examples for _ComputerGetNetworkCards, _ComputerGetProcessors, and _ComputerGetDrives.

Let me know if you need further help than is available in the examples.

Not at the moment. I'll do :ph34r:.

Also may I suggest from your post count you are new to AutoIt, and/or scripting. A great place to start is Welcome to AutoIt 1-2-3. This should help you be able to better use my examples file.

Right my count post is not high, but not so new to AutoIt :"> .

My first AutoIt "production" is the "Installe Un Click" script (http://www.freefalcon.com/forum/viewtopic.php?t=7670&highlight=iuc), 09/2004. Since this time I'm mainly working on a "game launcher" for an evolution of this modern combat flight sim called Falcon4 (OpenFalcon).

The OpenFlacon project being underground in last years, I can't really share the work done on the launcher.

What damn is doing this launcher ? Helping to set some command line parameters like bandwidth, host ips... and sharing it through the network so that players just have to get a file configuring and checking their sim for the flight. My friend Nanard developped a chat part in the launcher so that we have a sort of a lobby in which the host can check and set the sim settings of all pilots.

Thanks to the developpement of Koda I integrated the possibility to use multi user interface, and some can submit new ones.

Nanard also developped two online updaters. One for the launcher itself, and the second for the sim. They are very great.

Now I'm working on a module which is analyzing a debrief.txt outpout of the sim in order to automaticaly update an online mysql db (thanks to the cdkid MysSQL UDFs), and also on an hardware check to prevent leaks of some work (thanks to your UDFs :) ).

So not a lot of posts here, but not so new :"> . And I have to admit I'm a bit lazy :lmao: , that's why I asked for some orientations. I'll take a look to _ComputerGetNetworkCards, _ComputerGetProcessors, and _ComputerGetDrives. Thanks for these UDFs, I'm convinced it is exactly what I need :geek: .

Share this post


Link to post
Share on other sites

Not at the moment. I'll do :ph34r:.

Right my count post is not high, but not so new to AutoIt :"> .

My first AutoIt "production" is the "Installe Un Click" script (http://www.freefalcon.com/forum/viewtopic.php?t=7670&highlight=iuc), 09/2004. Since this time I'm mainly working on a "game launcher" for an evolution of this modern combat flight sim called Falcon4 (OpenFalcon).

The OpenFlacon project being underground in last years, I can't really share the work done on the launcher.

What damn is doing this launcher ? Helping to set some command line parameters like bandwidth, host ips... and sharing it through the network so that players just have to get a file configuring and checking their sim for the flight. My friend Nanard developped a chat part in the launcher so that we have a sort of a lobby in which the host can check and set the sim settings of all pilots.

Thanks to the developpement of Koda I integrated the possibility to use multi user interface, and some can submit new ones.

Nanard also developped two online updaters. One for the launcher itself, and the second for the sim. They are very great.

Now I'm working on a module which is analyzing a debrief.txt outpout of the sim in order to automaticaly update an online mysql db (thanks to the cdkid MysSQL UDFs), and also on an hardware check to prevent leaks of some work (thanks to your UDFs :) ).

So not a lot of posts here, but not so new :"> . And I have to admit I'm a bit lazy :lmao: , that's why I asked for some orientations. I'll take a look to _ComputerGetNetworkCards, _ComputerGetProcessors, and _ComputerGetDrives. Thanks for these UDFs, I'm convinced it is exactly what I need :geek: .

I am glad you are so positive that my UDF's will be helpful. I am sure they will be as well. Just download the examples file, along with the library file, everything is there you will need.

Welcome to the forums, and thanks for using AutoIt for quite some time :ph34r:.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Added _ComputerGetExtensions, and _ComputerGetSystem

I want everyone to know that I am still working on this project even if it is slow. I really appreciate everyone's support so far, this has been proven by the number of downloads I have had.

Thanks,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

I could make my own Task Manager =D.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Added _ComputerGetDesktops, _ComputerGetDependentServices, _ComputerGetPrintJobs, _ComputerGetBattery, _ComputerGetMotherboard, and _ComputerGetMonitor

Please let me know if there are other suggestions you have that you would like me to add.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Added _ComputerGetDesktops, _ComputerGetDependentServices, _ComputerGetPrintJobs, _ComputerGetBattery, _ComputerGetMotherboard, and _ComputerGetMonitor

Please let me know if there are other suggestions you have that you would like me to add.

JS

Thanks for this awesome udf. ;)

I'm right now working on a script to run at logon - placing info on a server. This script will give me the essential informations - even if the computer has crashed.

You ask for suggestions. I would like you to add IP-configuration.

RulleStenen

Denmark


It´s Only Rock´n´Roll, But I Like It

Share this post


Link to post
Share on other sites

Thanks for this awesome udf. ;)

I'm right now working on a script to run at logon - placing info on a server. This script will give me the essential informations - even if the computer has crashed.

You ask for suggestions. I would like you to add IP-configuration.

RulleStenen

Denmark

RulleStenen,

Could you please explain in more detail about IP-configuration?

Thanks,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Added _ComputerGetMemory, and _ComputerGetLoggedOnUsers

I hope this helps anyone...

LoggedOnUsers gives you DomainName, UserName, and LogonID.

Let me know if you have any more suggestions.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

RulleStenen,

Could you please explain in more detail about IP-configuration?

Thanks,

JS

Hi JS

What I would like to know about IP-configuration is:

- Is it DHCP-enabled

- Ip-Adresse (i know i can get it from @ipadress1)

- subnetmask

- default gateway

- primary and secondary dns-server

- dns-suffix

Hope you're able to come up with this too. ;)


It´s Only Rock´n´Roll, But I Like It

Share this post


Link to post
Share on other sites

;):lmao:

Very nice job indeed.

With the _ComputerGetMemory one can see the diffrent modules, but is there the possibility to see if there is a vacant bank? So one knows if an upgrade is possible?

Keep up the magnificent work.

Thnks

Share this post


Link to post
Share on other sites

Hey JS,

thanks for that awesome script. I used it to write a script which shows me the most important informations about the system.

One thing i want to do is to display a note if there are unknown devices or devices without a matching driver installed on the system. Is there a way to integrate that into your UDF, or is there another way?

Thanks,

Tom

Share this post


Link to post
Share on other sites

I downloded this utility last week and have enjoyed using it very much - wrote a very nifty little system info utility with it.

There was one item I noted (forgive me if they had been addressed in a previous post) that might be improved upon. When attempting to run certain functions on 2000 Server or 2000 Pro - It will give a error that the object is not supported. I'm assuming this is due to some WMI difference between 2003/XP and it's 2000.

In any case - I added a small bit of code to handle this such that it will run seemlessly between the OS.

function : _ComputerGetOSs

If (@OSVersion == "WIN_2000") OR (@OSVersion == "WIN_NT4") Then

$aOSInfo[$i][12] = "unavailable"

$aOSInfo[$i][13] = "unavailable"

$aOSInfo[$i][14] = "unavailable"

$aOSInfo[$i][15] = "unavailable"

$aOSInfo[$i][18] = "unavailable"

$aOSInfo[$i][24] = "unavailable"

$aOSInfo[$i][42] = "unavailable"

$aOSInfo[$i][51] = "unavailable"

$aOSInfo[$i][54] = "unavailable"

Else

$aOSInfo[$i][12] = $objItem.DataExecutionPrevention_32BitApplications

$aOSInfo[$i][13] = $objItem.DataExecutionPrevention_Available

$aOSInfo[$i][14] = $objItem.DataExecutionPrevention_Drivers

$aOSInfo[$i][15] = $objItem.DataExecutionPrevention_SupportPolicy

$aOSInfo[$i][18] = $objItem.EncryptionLevel

$aOSInfo[$i][24] = $objItem.LargeSystemCache

$aOSInfo[$i][42] = $objItem.ProductType

$aOSInfo[$i][51] = $objItem.SuiteMask

$aOSInfo[$i][54] = $objItem.SystemDrive

EndIf

function _ComputerGetProcesses

If (@OSVersion == "WIN_2000") OR (@OSVersion == "WIN_NT4") Then

$aProcessInfo[$i][1] = "unavailable"

Else

$aProcessInfo[$i][1] = $objItem.CommandLine

EndIf

there may be other places where inconsistencies are found - but in any case I thought I'd put it up here in case somebody found it useful

Share this post


Link to post
Share on other sites

I've also added a few other items which may or may not have been added by the time of me writing this - but here goes

Func _GetSystemDrivers(ByRef $SystemDrivers)

Local $colItems, $objWMIService, $objItem

Dim $SystemDrivers[1][22], $i = 1

$objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")

$colItems = $objWMIService.ExecQuery("Select * from Win32_SystemDriver", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) Then

For $objItem In $colItems

ReDim $SystemDrivers[uBound($SystemDrivers) + 1][22]

$SystemDrivers[$i][0] = $objItem.Name

$SystemDrivers[$i][1] = $objItem.PathName

$SystemDrivers[$i][2] = $objItem.ServiceSpecificExitCode

$SystemDrivers[$i][3] = $objItem.ServiceType

$SystemDrivers[$i][4] = $objItem.Started

$SystemDrivers[$i][5] = $objItem.StartMode

$SystemDrivers[$i][6] = $objItem.StartName

$SystemDrivers[$i][7] = $objItem.State

$SystemDrivers[$i][8] = $objItem.Status

$SystemDrivers[$i][9] = $objItem.SystemCreationClassName

$SystemDrivers[$i][10] = $objItem.SystemName

$SystemDrivers[$i][11] = $objItem.TagId

$SystemDrivers[$i][12] = $objItem.AcceptPause

$SystemDrivers[$i][13] = $objItem.AcceptStop

$SystemDrivers[$i][14] = $objItem.Caption

$SystemDrivers[$i][15] = $objItem.CreationClassName

$SystemDrivers[$i][16] = $objItem.Description

$SystemDrivers[$i][17] = $objItem.DesktopInteract

$SystemDrivers[$i][18] = $objItem.DisplayName

$SystemDrivers[$i][19] = $objItem.ErrorControl

$SystemDrivers[$i][20] = $objItem.ExitCode

$SystemDrivers[$i][21] = $objItem.InstallDate

$i += 1

Next

$SystemDrivers[0][0] = UBound($SystemDrivers) - 1

If $SystemDrivers[0][0] < 1 Then

SetError(1, 1, 0)

EndIf

Else

SetError(1, 2, 0)

EndIf

EndFunc

Func _GetEnvironmentVariables(ByRef $Environment)

Local $colItems, $objWMIService, $objItem

Dim $Environment[1][8],$i = 1

$objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")

$colItems = $objWMIService.ExecQuery("Select * from Win32_Environment", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) Then

For $objItem In $colItems

ReDim $Environment[uBound($Environment) + 1][8]

$Environment[$i][0] = $objItem.Name

$Environment[$i][1] = $objItem.Description

$Environment[$i][2] = $objItem.InstallDate

$Environment[$i][3] = $objItem.Caption

$Environment[$i][4] = $objItem.Status

$Environment[$i][5] = $objItem.SystemVariable

$Environment[$i][6] = $objItem.UserName

$Environment[$i][7] = $objItem.VariableValue

$i += 1

Next

$Environment[0][0] = UBound($Environment) - 1

If $Environment[0][0] < 1 Then

SetError(1, 1, 0)

EndIf

Else

SetError(1, 2, 0)

EndIf

EndFunc

Func _GetBootINI(ByRef $bootini)

If (_FileReadToArray(@HomeDrive&"\boot.ini", $bootini) == 0) Then ; falure

SetError(1)

EndIf

EndFunc

Share this post


Link to post
Share on other sites

can you help me with remote computers?

when i declare $cI_Compname = "****" other then my localhost i always get an error :)

Line 2369 (File "C:\Program files\AutoIt3\Include\CompInfo.au3"):

$colItems = $objWMIService^ERROR

Error: Variable must be of type "Object"

Example:

#Include <Date.au3>

Dim $System

$cI_Compname = "TESTCOMP"

_ComputerGetSystem($System)

MsgBox(0, "Test _ComputerGetSystem", "Model: " & $System[1][22])

MsgBox(0, "Test _ComputerGetSystem", "Name: " & $System[1][49])

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...