Sign in to follow this  
Followers 0
lopolop

getting computer information...

4 posts in this topic

is there a ways to get information like desktop size, color... like 16bit or 32bit... or maybe hardrive size and normalthings like that easily...


Share this post


Link to post
Share on other sites



Hey guys,

Ok, first off I have the latest beta and the latest scite install.

I have an app I wrote that uses GuiTab.au3, when I try to beta run it from the menu in Scite I get....

C:\Program Files\AutoIt3\Include\GuiTab.au3 (217) : ==> Unknown function name.:

However I can run the beta compile and the app runs just fine.

Second issue, the "beta help" menu item under tools in Scite has the wrong path, it pops up an alert saying error while launching cannot find "beta/autoit3help.exe"

The file is in there and I just made a direct shortcut to it but thought someone should know...

...oh and the function it complains about is DllStructCreate....

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1++
; Author: Chaos2 
; Script Function:  output basic hardware info
;
; ----------------------------------------------------------------------------

$objWMIService = objget("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

$colSettings = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
$colMemory = $objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
$colCPU = $objWMIService.ExecQuery("Select * from CIM_Processor")
$colVideoinfo = $objWMIService.ExecQuery("Select * from Win32_VideoController")
$colSound = $objWMIService.ExecQuery("Select * from Win32_SoundDevice")
$colMouse = $objWMIService.ExecQuery("Select * from Win32_PointingDevice")
$colMonitor = $objWMIService.ExecQuery("Select * from Win32_DesktopMonitor")
$colNIC = $objWMIservice.ExecQuery("Select * from Win32_NetworkAdapter WHERE Netconnectionstatus = 2")
Dim $pcinfo


For $object in $colCPU
    $PcInfo = $pcinfo & StringStripWS($object.Name,1) & @CRLF
Next

For $objOperatingSystem in $colSettings 
    $PcInfo = $PcInfo & $objOperatingSystem.Caption & " Build " & $objOperatingSystem.BuildNumber & " Servicepack " & $objOperatingSystem.ServicePackMajorVersion & "." & $objOperatingSystem.ServicePackMinorVersion & @CRLF
    $PcInfo = $PcInfo & "Available Physical Memory: " & String(Int(Number($objOperatingSystem.FreePhysicalMemory) / 1024)) & " Mb" & @CRLF
Next

For $object in $colMemory
    $PcInfo = $PcInfo & "Total Physical Memory: " & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024))) & " Mb" & @CRLF
Next

$objFSO = objCreate("Scripting.FileSystemObject")
$colDrives = $objFSO.Drives

$Opticaldrives = "Opticaldrives : " 

For $object in $colDrives
    If ($object.DriveType == 2) then
        $PcInfo = $PcInfo & "Total space on : " & $object.DriveLetter & ":\  (" & $object.VolumeName & ")  = " & String(Round((Number($object.TotalSize) / (1024 * 1024 * 1024)),2)) & " Gb" & @CRLF
        $PcInfo = $PcInfo & "Free space on  : " & $object.DriveLetter & ":\  (" & $object.VolumeName & ")  = " & String(Round((Number($object.FreeSpace) / (1024 * 1024 * 1024)),2)) & " Gb" & @CRLF
    Else
        $Opticaldrives = $Opticaldrives & $object.DriveLetter & ":\ "
    EndIf
Next

$PcInfo = $PcInfo & $Opticaldrives & @CRLF

For $object in $colVideoinfo
    $PcInfo = $PcInfo & "Video card: " & $object.Description & @CRLF
Next

For $object in $colSound
    $PcInfo = $PcInfo & "Sound device: " & $object.Description & @CRLF
Next

For $object in $colMouse
    $PcInfo = $PcInfo & "Mouse : " & $object.Description & @CRLF
Next

For $object in $colMonitor
    $PcInfo = $PcInfo & "Monitor : " & $object.Description & @CRLF
Next

For $object in $colNIC
    $Pcinfo = $pcinfo & $object.name & @CRLF
Next
ClipPut( $pcinfo )
MsgBox(48,"PCinfo",$PcInfo)
MsgBox( 48, "PCinfo", "Information was copied to clipboard", 5)

there are others in the scripts and scraps section

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Hi,

very cool script. :lmao: I think I can use some lines of your code. :P I just looked at the WMIC interface, but I didn´t know that I can use it with Autoit.

Thanks a lot sharing your code.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

thanks valuater thats exactly what i wanted


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  
Followers 0