#61939 - 2002-01-09 10:00 AM
Search in remote Registry (4 Levels deep)
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Hi all,and then came the time when i was strucked by inventory needs .... Here is one for the pro's : need to evaluate (amongst others) the type of Backup device which is located in \\[Server]\HKLM\HARDWARE\DEVICEMAP\SCSI\???(SCSI Port n)\???(SCSI Bus n)\???(Target ID n)\???(Logical Unit ID n)\Identifier A search Criteria is where DeviceName = Tape0 , Identifier equals the Tape Device type ... Tried kinda recursive enumkey() with 4d arrays and 4 single dimension arrays ... no luck by now If anyone wants to help or has a better way of getting this Info ... it would be highly appreciated  J.
_________________________
|
|
Top
|
|
|
|
#61941 - 2002-01-09 11:52 AM
Re: Search in remote Registry (4 Levels deep)
|
Alex.H
Seasoned Scripter
Registered: 2001-04-10
Posts: 406
Loc: France
|
jpols, When reaching it manually, do you find it ? if yes, can you post tbe complete path ?
_________________________
? getobject(Kixtart.org.Signature)
|
|
Top
|
|
|
|
#61944 - 2002-01-09 04:36 PM
Re: Search in remote Registry (4 Levels deep)
|
Anonymous
Anonymous
Unregistered
|
Condolences Jpols, from the man who spent several hours this morning tring to write a script that would edit ACL lists down a directory tree without overwriting the existing permissions.by 11am I was pulling my hair out and someone wandered over and said did you know CACLS.exe does that?
|
|
Top
|
|
|
|
#61945 - 2002-01-09 05:53 PM
Re: Search in remote Registry (4 Levels deep)
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
jpols, still can't get the reason for array. Would be helpfull to see your script part. Anyway, why don't you do something like (not really tested, just pulling out from my head):
code:
$i=0 $portkey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI",$i) while len($portkey) $i2=0 $buskey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey",$i2) while len($buskey) $i3=0 $targetkey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey\$buskey",$i3) while len($targetkey) $i4=0 $unitkey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey\$buskey\$targetkey",$i4) while len($unitkey) $value = readvalue("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey\$buskey\$targetkey\$unitkey","DeviceName") if len("$value") $value ? endif $i4 = $i4+1 $unitkey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey\$buskey\$targetkey",$i4) loop $i3=$i3+1 $targetkey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey\$buskey",$i3) loop $i2=$i2+1 $buskey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI\$portkey",$i2) loop $i=$i+1 $portkey = enumkey("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SCSI",$i) loop
or have I misunderstood your question?
_________________________
!download KiXnet
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 581 anonymous users online.
|
|
|