14.00 Normal 0 false 21 false false false FR X-NONE X-NONE

Warning ! As I'm not English maybe I've said thing badly, I'll correct it if you say me what I've wrong written.
You can see the orginal topic here : http://community.kaseya.com/regions/fr/f/240/t/14853.aspx?goback=.gde_870177_member_108695438


Hi,

I propose to you to grab information about customer’s screens & graphics card in custom audit field.

I give you two files : the VBscript who grab EDID of Screens and Graphics card informations, and the xml Procedures.

The Script (VBScript)

Syntax :

Run as Admin to test

Cscript.exe inventoryscreen.vbs “%userprofile%\Desktop\inventoryscreen.txt” “%userprofile%\Desktop\inventoryscreen.txt”

Explain :

·        Prefer cscript instead of wscript for use less ressources and be sure that the echo command will work on the command shell.

·        The first arguments is the file where you want to put the information about your screens

·        The second arguments is the file file where you want to put the information about your graphics card.

Note : Warning the file “%userprofile%\Desktop\inventoryscreen.txt” & “%userprofile%\Desktop\inventoryscreen.txt” will not be created, the script will use the split command and put an index between inventoryxxxx and the txt ext, for the screen I use 0 to n and for the graphics 1 to n. (where n is how much graphics card or screen detected).

Kaseya :

Part 1:

Add new custom field as:

Screen 1 - Manufacturer, Screen 1 - Description, Screen 1 - Model, Screen 1 – Serial
Graphics 1 – Resolution, Graphics 1 – Description, Graphics 1 – Date of Driver, Graphics 1 – Version of Driver

Procedure:

Import the XML, and add the script to your Kserver. (Maybe you must correct the custom field name as your are note French ;) and the path)

Step of the Script:

  • Create folder Files and ScriptResult in your Temp Agent directory if they not exists
  • Copy the Script in Files if the script not exists
  • Execute the script with the “#vAgentConfiguration.agentTempDir#\ScriptResults\inventoryscreen.txt” and “#vAgentConfiguration.agentTempDir#\ScriptResults\inventorygraph.txt” as parameters
  • For each screen you will add a IF the file #vAgentConfiguration.agentTempDir#\ScriptResults\inventoryscreen0.txt exists with theses parameters :
    • Execute Command Shell – Get Results as Variable :
    • for /F “tokens=2 delims==” %a IN ('find /I ”Manufacturer” «#vAgentConfiguration.agentTempDir#\ScriptResults\inventoryscreen0.txt»') Do echo %a
      • If #global:cmdresults# Contains Echo
          Update custom field to N/A
        Else
      •  Update  custom field to #global:cmdresults#
      • Execute Command Shell – Get Results as Variable :
      •  for /F “tokens=2 delims==” %a IN ('find /I ” Description” «#vAgentConfiguration.agentTempDir#\ScriptResults\inventoryscreen0.txt»') Do echo %a
      •  If #global:cmdresults# Contains Echo
               Update vSystemInfo Screen 1 - Description
        to N/A
        Else
      • Update vSystemInfo Screen 1 - Description to #global:cmdresults#

And continue for each custom field…


In all Case think to suppress the files generated by the script.

The output of the script is :

For the screen (on a laptop there’s no Serial ;) ):

Manufacturer   = (Types d’écrans standard)
Description    = Moniteur Plug-and-Play générique
Model   (EDID) = Sony LCD
Serial# (EDID) =

For the graphics (Warning on Core i5 and i7) :

Caption=             Intel(R) Graphics Media Accelerator HD
Current Resolution=        1680x1050
Description=       Intel(R) Graphics Media Accelerator HD
DriverDate=        06/04/2010
DriverVersion= 8.16.11.9024