ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
692
692
EMPFEHLEN
-
Hi zusammen,
ich hoffe Ihr könnt mir weiterhelfen. Ich muss in meiner Firma inventur machen, dazu gehört auch das Inventarisieren der Monitore. Wir benutzen hier Kixtart als Anmeldescript deswegen hab ich mal nach nem fertigen script gesucht was monitor infos auslesen kann.
Hab jetzt dieses Script gefunden.
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
; Return monitor info. Break ON $=SetOption("Explicit","ON") $=SetOption("WrapAtEOL","ON") $=SetOption("ASCII","ON") GLOBAL $VERBOSE $VERBOSE=1 ; Set to "0" to disable debug info Dim $KEY_DISPLAY Dim $iIndexPri,$iIndexSub Dim $sMonitor,$sDevice $KEY_DISPLAY="HKLM\SYSTEM\CurrentControlSet\Enum\Display" ; Iterate through possible displays. Log(Log("Starting scan for monitor info...")) $iIndexPri=0 While Not @ERROR $sMonitor=EnumKey($KEY_DISPLAY,$iIndexPri) $sMonitor=$KEY_DISPLAY+"\"+$sMonitor Log("--------------------------------------------") Log("Primary key is '"+$sMonitor+"'") $iIndexSub=0 $sDevice=EnumKey($sMonitor,$iIndexSub) while Not @ERROR $sDevice=$sMonitor+"\"+$sDevice Log(" Secondary key is '"+$sDevice+"'") If KeyExist($sDevice+"\Control") Log(" Control found - device assumed to be active") If Instr(ReadValue($sDevice,"HardwareID"),"Monitor\")=1 Log(" Device type is monitor.") ParseEDID(ReadValue($sDevice+"\Device Parameters","EDID")) Else Log(" Device type is not monitor.") EndIf Else Log(" Control not found - device assumed to be inactive") EndIf $iIndexSub=$iIndexSub+1 $sDevice=EnumKey($sMonitor,$iIndexSub) Loop $iIndexPri=$iIndexPri+1 $sMonitor=EnumKey($KEY_DISPLAY,$iIndexPri) Loop Log("Completed scan for monitor info.") Exit 0 Function ParseEDID($sEDID) Dim $iOffset, $sBlock If $sEDID="" Log(" No EDID information associated with device") Exit 0 EndIf ; Check for valid EDID data If SubStr($sEDID,1,16)="00ffffffffffff00" Log(" EDID signature is valid") Else Log(" EDID signature is invalid: "+SubStr($sEDID,1,16)) Exit 0 EndIf Log(" "+$sEDID) Log(" EDID Version number is " +Execute("Exit &"+SubStr($sEDID,(&12+1)*2-1,2)) +"." +Execute("Exit &"+SubStr($sEDID,(&13+1)*2-1,2))) ; Look for serial number and model number in descriptor blocks. For $iOffset=54 To 108 Step 18 $sBlock=SubStr($sEDID,$iOffset*2+1,18*2) Select Case Left($sBlock,8)="000000fc" " Model: " Bin2Str(SubStr($sBlock,9)) ? Case Left($sBlock,8)="000000fe" " Other info: " Bin2Str(SubStr($sBlock,9)) ? Case Left($sBlock,8)="000000ff" "EDID 1.3 Serial number: " Bin2Str(SubStr($sBlock,9)) ? Case "Unknown type" Log(" Unknown type: "+Left($sBlock,8)) EndSelect Next "EDID 1.2 Serial number: "+Execute("Exit &"+SubStr($sEDID,(&1C+1)*2-1,8))+@CRLF " Week of manufacture: "+Execute("Exit &"+SubStr($sEDID,(&10+1)*2-1,2))+@CRLF " Year of manufacture: "+(1990+Execute("Exit &"+SubStr($sEDID,(&11+1)*2-1,2)))+@CRLF EndFunction Function Bin2Str($s) Dim $c While $s $c=Execute("Exit &"+Left($s,2)) ; Truncate string at CR If $c=10 Exit 0 EndIf iF $c $Bin2Str=$Bin2Str+Chr($c) EndIf $s=SubStr($s,3) Loop Exit 0 EndFunction Function Log($s) If $VERBOSE @DATE+" "+@TIME+" "+$s+@CRLF EndIf Exit 0 EndFunction
Der Code funktioniert auch soweit wie er soll .. Also am ende krieg ich die drei wichtigsten Sachen raus : Typ, Herstellungs datum und SN. Nun möchte ich die ergebnisse in ein txt file auf unserem Fileserver abspeichern. Das Problem ist, ich hab absolut kein plan wie ich das Script umschreiben soll damit er das Ergbniss in ein txt file reinschreibt anstatt es in der Konsole auszugeben.
Ich hoffe ich habe mein Problem verständlich Formuliert und hoffe hiermit auf hilfe von eurer seite
Gruß
Walter
Ähnliche Themen
-
Deutsche Hilfe für KIXtart gesucht
Von lausbub im Forum Sonstige SprachenAntworten: 2Letzter Beitrag: 28.08.09, 13:10 -
Upload mit PHP. Header info auslesen !?
Von pesoi im Forum PHPAntworten: 11Letzter Beitrag: 18.05.07, 18:33 -
Xml Info
Von Flasher111 im Forum Flash PlattformAntworten: 3Letzter Beitrag: 18.02.07, 12:19 -
[KiXtart] Batchfile in Kix?
Von Eddy von RM im Forum Sonstige SprachenAntworten: 0Letzter Beitrag: 14.04.04, 11:16 -
D-Info auslesen
Von patrique im Forum Delphi, Kylix, PascalAntworten: 0Letzter Beitrag: 13.09.03, 19:59





Zitieren
Login





