Jump to content

Recommended Posts

Posted (edited)

here is the array display of $b

http://www.postyourimage.com/view_image.ph...EaVMi1217861795

so im trying to display each instance of where there is a mapped drive (where column 2 = 0)

but it only displays the first instance

any ideas?

thanks!

#include <Array.au3>
#include "HKCUReg.au3"
                  
    $sComputer = "d0079214"
                  
    For $i = 1 To 100
         $b = _HKCU_EnumKey("\\\" & $sComputer & "\Network", $i)
            $iProd = 1
        For $j = 1 To $b[0][0]
            $iProd *= $b[$j][2]
        Next

    If $iProd <> 0 Then ExitLoop

;       _ArrayDisplay($b, $i)

    If $b[$i][2]=0 Then
    $path= _HKCU_Read("\\\" & $sComputer & "\Network\" & $b[$i][1], "RemotePath")
    MsgBox(0, "", "User: "  & $b[$i][0] & @CRLF & _
                          "Drive: " & $b[$i][1] & @CRLF & _
          "Path: " & $path)
    EndIf

                          
    Next
Edited by gcue
Posted (edited)

Isn't the test "If $iProd <> 0 Then ExitLoop" busting you out of your main loop before you've processed all 100?

Edited by Spiff59
Posted

good point! it checks to see if there are values under that registry key.. hmm ill look into it further.

thanks!

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
×
×
  • Create New...