Jump to content

Computer Plucker - remote PC inventory

Recommended Posts

Computer Plucker is a fork and a "restoration" of Computer stats utility by @Rogue5099 (link)
You can obtain various data about local machine, as from the screenshot.


But my goal is not (only) to provide another PC stats tool, but to develop a very basic remote inventory tool, like (a small subset of) the abandoned Spiceworks or the Microsoft SCCM.

So this script can be deployed on a machine as a standalone executable (yes you need only ONE file to distribute) , and launching the .EXE it installs itself to a folder (es. c:\autoit\computerplucker)

In tools menù you can set two tasks and not only

  • one for creating every week a file.ini with all the data of the machine.
  • another one  for creating every week a file.ini with all the data of the machine PLUS uploading a CRYPTED record of the machine in a free mysql DB online

For my needs, I am  deploying the .exe and schedule the second task, uploading data one time a week.

In tools menù you will find also commands for:

  • manual creating the .ini data file
  •  to upload the data in crypted records
  • to upload the data in clear text records (for testing..)
  • total uninstall of ComputerPlucker, with a simple security code.
  • many other tasks in not so logical order.. next version I have to tidy the menù...

So my plan is to deploy this on my machines, and have the data in a online DB, this DB will be for me only a "cache" for data records to be downloaded (and deleted) by another script.

As today the account of this TEST DB is embedded in code, using the "File to Base64 String' Code Generator" by @UEZ (used also for embedding icons and XML task definitions)

    Local $mysqlhost = "sql11.freemysqlhosting.net"
    Local $mysqlport = "3306"
    Local $mysqldb = "sql11403701"
    Local $mysqluser = "sql11403701"
    Local $mysqlpsw = "QtL7T9U5GV"

The DB is one table of 30 mysql tinytext fields... very simple indeed...

You can try to upload data to this DB and access (phpmyadmin or a random mysql browser app) to see the results.

Or you can use my ComputerPluckerDBbrowser (see at the end of this post) a script to collect and manage the data.


PRIVACY warning: you are uploading data of your PC account and PC data, test as your risk (or test in another account...)


I also created a small post in a blog for not so geek friends, and I have a more advanced version of the data browser, you can have more info lookin' here. 😀

Attached you will find the code, and all the necessary includes are at this >link<.

ComputerPlucker.EXE is downloadable >HERE<

ComputerPluckerDBbrowser.EXE is downloadable >HERE<






Edited by t0nZ
V.3.7.8 out
Link to post
Share on other sites

Nice GUI :)

;_ArrayDisplay($PList, "Running Processes", -1, 0, "", "|", "#|Process|ID") ; <<<<< this crashes
_ArrayDisplay($PList, "Running Processes", "", 0, "|", "Process|ID")

;also, "StringLeft(@WindowsDir, 2)" is better than "c:", as c: may not exist.


Edited by argumentum
Link to post
Share on other sites

lol, I'm a pain. I also added these.


... ...

Global Const $appname = "Computer Plucker", $Ver = "V.3.0.1 BETA"
If WinExists("[TITLE:" & $appname  & "(" & $Ver & ");CLASS:AutoIt v3;]") Then
    WinActivate("[TITLE:" & $appname & ";CLASS:AutoIt v3 GUI;]")
    Exit 3 ; as 1 and 2, I leave for internal AutoIt
AutoItWinSetTitle($appname & "(" & $Ver & ") on PID: " & @AutoItPID)
SplashTextOn($appname & " is loading...", "", 250, 0)
If FileGetSize(StringTrimRight(@ScriptFullPath, 4) & ".ico") Then TraySetIcon(StringTrimRight(@ScriptFullPath, 4) & ".ico")
TraySetState(1) ; $TRAY_ICONSTATE_SHOW (1) = Shows the tray icon (default)
... ...

$MainGUI = GUICreate($appname & " - " & $Ver, 400, 455, -1, -1, 0x00CA0080, $WS_EX_ACCEPTFILES)
DllCall('shell32.dll', 'long', 'SetCurrentProcessExplicitAppUserModelID', 'wstr', $appname & $Ver) ; look at _WinAPI_SetCurrentProcessExplicitAppUserModelID()
If FileGetSize(StringTrimRight(@ScriptFullPath, 4) & ".ico") Then GUISetIcon(StringTrimRight(@ScriptFullPath, 4) & ".ico") ; http://www.rw-designer.com/icon-detail/4560 

... ...

TraySetState(2) ; $TRAY_ICONSTATE_HIDE (2) = Destroys/Hides the tray icon
#EndRegion - Loading GUI with Infomation

;;; and if the above is true, then might as well

        Case $GUI_EVENT_CLOSE
... ...

        Case $ProcessList
            $PList = ProcessList()
            AdlibRegister("_ArrayDisplay_AddIcon", 100)
            GUICtrlSetState($ProcessList, $GUI_DISABLE)
            _ArrayDisplay($PList, "Running Processes", "", 0, "|", "Process|ID")
            GUICtrlSetState($ProcessList, $GUI_ENABLE)
            AdlibUnRegister("_ArrayDisplay_AddIcon") ; just in case "_ArrayDisplay_AddIcon()" failed

... ...

Func _ArrayDisplay_AddIcon()
    If FileGetSize(StringTrimRight(@ScriptFullPath, 4) & ".ico") Then
        If WinExists("[TITLE:Running Processes;CLASS:AutoIt v3 GUI;]") Then
            GUISetIcon(StringTrimRight(@ScriptFullPath, 4) & ".ico", -1, WinGetHandle("[TITLE:Running Processes;CLASS:AutoIt v3 GUI;]"))

that gives the option of a custom icon and independence from other uncompiled scripts.

Edit: ...and it may take some time while collecting data so the SplashTextOn() and also on exit "@SW_HIDE" it first and ... hope you like the ideas :) 

Edited by argumentum
more "great" ideas ;)
Link to post
Share on other sites

bug report: Tools > Details on Drive... when i select any of my drives, i get the Drive Info window with all the details except for the temperature which is left blank, and a COM error with all fiields blank except err.number is: 00000000

if this works for you, then i'd happily investigate this further on my pc tomorrow.

Link to post
Share on other sites
13 hours ago, orbs said:

bug report: Tools > Details on Drive... when i select any of my drives, i get the Drive Info window with all the details except for the temperature which is left blank, and a COM error with all fiields blank except err.number is: 00000000

if this works for you, then i'd happily investigate this further on my pc tomorrow.

Hi @orbs I already noticed that, not working also for me (tested in 4  machines..) in the original script the error was not managed so I made some research and I substituted that piece of code but for now my only result is a managed error 😄...

Thank you for your interest, if you find a way to fix it you are always welcome 😅

Link to post
Share on other sites

Ok V.3.7.5 is out since some days, perfectable but ok for my basic needs, meanwhile I have the companion app to remote collect data about the machines, the way I'am doing this is a bit "convoluted..." but I have a particular network situation..

Btw, more high level details in this blog post


And I am using the "about" from @Professor_Bernd .. Thank you !


Link to post
Share on other sites
9 minutes ago, t0nZ said:

Many tanks

🔫 🔫 🔫 🔫
🚗🚗🚗🚗 (Cars + squirt guns = Tanks)

I think you meant thanks ;) 

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.


My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager

Link to post
Share on other sites

Nice work! 👍

I downloaded "cp-includes.zip" and "ComputerPlucker.au3" and unzipped them together into one folder. Then started the "ComputerPlucker.au3" with Pau3. Unfortunately no pictures are displayed. (see screenshot). Did I do something wrong?



Suggestion for the version info: Maybe you can sort the versions descending, so from new to old? If there are more versions, you always see the newest first.

Thanks for using my about dialog! :)


Link to post
Share on other sites

The issue is in line 3914

GUICtrlCreatePic("C:\autoit\ComputerPlucker\NSC_fs_red.jpg", $iCtrls_Left + 10, 145, $iCtrls_Width - 20, 130) ; NSC added

This should fix it:

GUICtrlCreatePic(@ScriptDir & "\NSC_fs_red.jpg", $iCtrls_Left + 10, 145, $iCtrls_Width - 20, 130) ; NSC added



Btw, very nice GUI design. 👍

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to post
Share on other sites
  • 2 weeks later...

V.3.7.8 Out.

Various improvements, see the change log.

And changed the CPU realtime usage monitor, in the original script there was a typeperf.exe running in background all the time writing a text file to be read... never liked that system.

Placed instead the code from this post  , wmic query and more eyecandy 😉


Link to post
Share on other sites
  • 5 months later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Fernandin
      Let me get it straight...
      I've been having such a great experience with AutoIt, it helped me a lot at my work. And now, I gotta make some configurations in the BIOS of many computers at my work. So, I'd like to know,  is it possible to use AutoIt (or some programming language) to write an algorithm that when compiled and transefered to a pen drive, it's "plug and run"? 
    • By Inpho
      Hi All,
      I didn't know where to put this; my apologies if this is the wrong location.
      When you plug a Samsung mobile device (phone, tablet, etc.) into the USB of a Windows PC, you can right-click the device in My Computer and select Properties. Here, it will show you the correct serial number of the device. Clearly Windows doesn't use adb to get the SN so I'm stuck at how to get the SN without adb and where the device doesn't have a drive letter assigned to it.
      When I last picked this up, I tried seemingly everything I could from wmi(?) and winmgmts(?) but either it's hidden cloak-and-dagger style or I can't see the forest for the trees...
      Does anyone know what API Windows uses when getting the serial number of a device Windows calls a Portable Media Player?

    • By MazeM
      here's another UDF for the serial port. It is very similar to CommAPI using kernel32.dll, but all code is packed into a single file without any dependencies, not even using WinAPI.au3. It differs from existing UDF that it doesn't allow a timeout when reading, instead it always returns immediately, either with the requested amount ob bytes read or with a failure status. And of course there is a function provided to query the amount of available bytes in the receive buffer. The reason behind this design decision: You can do 1000 other things in the main loop while checking from time to time if enough data bytes arrived. There's no point to block the program waiting for the serial port.
      It is currently a work-in-progress, as I didn't test all functions yet. The code was developed and tested on Windows 7 64 bit.  The ComUDF-Tests.au3 shows some tests and basic usage of the UDF. Maybe there's no reason to use this UDF, given the existence of the others UDFs, but I did it to get to know DllCall better - I use structs no only to pass but also to get data back (I don't use the array returned by DllCall to read that data, unless required). You're welcome to test it on older and newer Windows versions.
      Here's a list of the implemented functions:
      ; _ComListPorts ; _ComOpenPort ; _ComSetTimeouts ; _ComClosePort ; ; _ComSetBreak ; _ComClearBreak ; _ComGetInputcount ; _ComGetOutputcount ; _ComClearOutputBuffer ; _ComClearInputBuffer ; ; _ComSendByte ; _ComReadByte ; _ComSendBinary ; _ComReadBinary ; ; _ComSendChar ; _ComReadChar ; _ComSendCharArray ; _ComReadCharArray ; _ComSendString ; _ComReadString ; ; __ComClearCommError ; __PurgeComm Maze
    • By Satvik
      I am trying to open a dll using DLLOpen, however everytime i try to do so the function fails and returns -1 result. 
      I have the dll in the same folder as the auto it script. 
      Local $hDLL = DllOpen("C:\Users\310255155\Downloads\COMMGvv2\commg.dll") DllCall($hDLL, "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0) DllClose($hDLL) MsgBox(0,'result',$hDLL)  
    • By dainiusb
      So I'm trying to send a string of data to Arduino using CommMG UDF. It seems that Arduino is not receiving it. I used Device Monitoring Studio and it shows that the data is sent fine and looks exactly the same as if I sent it from Arduino Serial Monitor. Is CommMG compatible with USB?
      Global $CMPort = 9 Global $CmBoBaud = 9600 Global $sportSetError = '' Global $CmboDataBits = 8 Global $CmBoParity = "none" Global $CmBoStop = 1 Global $setflow = 2 _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) If @error Then MsgBox(16,"Error!","Can't connect to Arduino on port - "&$CMPort) Exit EndIf _CommSetRTS(0) _CommSetDTR(0) _CommSendString("x" & 128 & "y" & 256 & "e", 1)  
  • Create New...